Bug 49874 - ucs-test: CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on DN
ucs-test: CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on DN
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-2-errata
Assigned To: Julia Bremer
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-19 19:43 CEST by Florian Best
Modified: 2019-11-06 14:40 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (git:fbest/49874-empty-dns-record) (3.37 KB, patch)
2019-08-09 11:02 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-07-19 19:43:42 CEST
attachment 10121 [details] (s4connector.log from a ucs-test run) contains 340 times:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 910, in __sync_file_from_ucs
    if ((old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, unicode(old_dn, 'utf8'), old, new)) or (not old_dn and not self.sync_from_ucs(key, mapped_object, pre_mapped_ucs_dn, old_dn, old, new))):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2520, in sync_from_ucs
    self.property[property_type].con_sync_function(self, property_type, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/dns.py", line 1640, in ucs2con
    s4_host_record_create(s4connector, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/dns.py", line 959, in s4_host_record_create
    dnsNodeDn = s4_dns_node_base_create(s4connector, object, dnsRecords)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/dns.py", line 904, in s4_dns_node_base_create
    __create_s4_dns_node(s4connector, dnsNodeDn, relativeDomainNames, dnsRecords)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/dns.py", line 507, in __create_s4_dns_node
    s4connector.lo_s4.lo.add_s(dnsNodeDn, al)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 210, in add_s
    return self.result(msgid,all=1,timeout=self.timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 503, in result
    resp_type, resp_data, resp_msgid = self.result2(msgid,all,timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 507, in result2
    resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all,timeout)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 514, in result3
    resp_ctrl_classes=resp_ctrl_classes
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 521, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 106, in _ldap_call
    result = func(*args,**kwargs)
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=n0vg5ew5si,DC=zv3pf30r1a.fzxtw3ascy,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=tnkuzvxxtk,DC=vbtxbtkpdr.ydnjrva5me,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=x2,DC=autotest091.local,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=x1,DC=autotest091.local,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=iqy9ogm1xj,DC=vl0x9xfphk.ndezrv7yop,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=dj7qmunpam,DC=m38f7xgb3r.qyiqrxsttg,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=jqnx95si0w,DC=or9uzh68vh.eai0y41qax,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=zg8i9gem5m,DC=m38f7xgb3r.qyiqrxsttg,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=q0xb10s1to,DC=z28pju6vdy.zr1y0ng5tw,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=ujkcxgra6d,DC=or9uzh68vh.eai0y41qax,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
CONSTRAINT_VIOLATION: {'info': "attribute 'dnsRecord' on 'DC=pc5og119tq,DC=z4swgdfpap.n5jc7qv1zl,CN=MicrosoftDNS,DC=DomainDnsZones,DC=autotest091,DC=local' specified, but with 0 values (illegal)", 'desc': 'Constraint violation'}
Comment 1 Florian Best univentionstaff 2019-08-09 11:02:46 CEST
Created attachment 10155 [details]
patch (git:fbest/49874-empty-dns-record)

Just ignore if the list of records is empty?
Comment 2 Florian Best univentionstaff 2019-10-23 12:53:08 CEST
This can easily be reproduced by creating a host record in UDM without any a record:

# udm dns/host_record create --superordinate "zoneName=$(domainname -d),cn=dns,$(ucr get ldap/base)" --set name=without-a-record

Multiple of our tests are doing this.
Comment 3 Julia Bremer univentionstaff 2019-10-25 15:27:29 CEST
a6074be3e6 Bug #49874: Yaml
671b509425 Bug #49874: Fix empty dnsRecord creates Reject


Successful build
Package: univention-s4-connector
Version: 13.0.2-55A~4.4.0.201910251509
Branch: ucs_4.4-0
Scope: errata4.4-2
User: jbremer
Comment 4 Florian Best univentionstaff 2019-10-28 11:18:06 CET
OK: code-review
OK: problem reproduced + fixed
OK: YAML
OK: ucs-test logfiles: traceback is gone
Comment 5 Julia Bremer univentionstaff 2019-10-28 18:15:16 CET
6c117f439d Bug #49874: Test if DNS host record objects are synced to Ad

Added a test for this problem
Comment 6 Arvid Requate univentionstaff 2019-11-06 14:40:57 CET
<http://errata.software-univention.de/ucs/4.4/330.html>