Bug 53720

Summary: S4C: CONSTRAINT_VIOLATION: Failed to re-index objectSid
Product: UCS Reporter: Florian Best <best>
Component: S4 ConnectorAssignee: Samba maintainers <samba-maintainers>
Status: NEW --- QA Contact: Samba maintainers <samba-maintainers>
Severity: normal    
Priority: P5    
Version: UCS 4.4   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=49668
https://forge.univention.org/bugzilla/show_bug.cgi?id=47380
https://forge.univention.org/bugzilla/show_bug.cgi?id=50108
https://forge.univention.org/bugzilla/show_bug.cgi?id=49269
https://forge.univention.org/bugzilla/show_bug.cgi?id=47208
https://forge.univention.org/bugzilla/show_bug.cgi?id=47282
https://forge.univention.org/bugzilla/show_bug.cgi?id=41906
https://forge.univention.org/bugzilla/show_bug.cgi?id=53752
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:

Description Florian Best univentionstaff 2021-08-30 17:53:11 CEST
During the installation of UCS@school 4.4 we see the following traceback every day during the first run of the S4-Connector:

(e.g. in https://jenkins.knut.univention.de:8181/job/UCSschool-5.0/job/Upgrade%20Multiserver/Config=s4,TestGroup=base1/ws/test/slave2081/connector-s4.log)

29.08.2021 20:13:00.663 LDAP        (PROCESS): sync from ucs: [            dc] [       add] cn=master208,ou=Domain Controllers,DC=AUTOTEST208,DC=LOCAL
29.08.2021 20:13:00.673 LDAP        (PROCESS): sync_from_ucs: error during add, searching for conflicting deleted object in S4
29.08.2021 20:13:00.673 LDAP        (PROCESS): sync_from_ucs: no conflicting deleted object found
29.08.2021 20:13:00.676 LDAP        (WARNING): sync failed, saved as rejected
	/var/lib/univention-connector/s4/1630260206.055766
29.08.2021 20:13:00.677 LDAP        (WARNING): Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 891, 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 2423, in sync_from_ucs
    self.lo_s4.lo.add_ext_s(compatible_modstring(object['dn']), compatible_addlist(addlist), serverctrls=ctrls)  # FIXME encoding
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 195, in add_ext_s
    resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.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': '0000202F: ../../ldb_key_value/ldb_kv_index.c:2506: Failed to re-index objectSid in CN=master208,OU=Domain Controllers,DC=autotest208,DC=local - ../../ldb_key_value/ldb_kv_index.c:2351: unique index violation on objectSid in CN=master208,OU=Domain Controllers,DC=autotest208,DC=local', 'desc': 'Constraint violation'}