Bug 47415

Summary: Traceback in AD-Connector after update to 4.3-1
Product: UCS Reporter: Christina Scheinig <scheinig>
Component: UMC - UsersAssignee: Felix Botner <botner>
Status: CLOSED FIXED QA Contact: Arvid Requate <requate>
Severity: normal    
Priority: P5 CC: botner, heidelberger, requate, scheinig
Version: UCS 4.3Flags: requate: Patch_Available+
Target Milestone: UCS 4.3-1-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.343 Enterprise Customer affected?: Yes
School Customer affected?: ISV affected?:
Waiting Support: Yes Flags outvoted (downgraded) after PO Review:
Ticket number: 2018072721000249, 2018072721000338 Bug group (optional):
Max CVSS v3 score:
Attachments: Bug47415_untestet_proposal.patch

Description Christina Scheinig univentionstaff 2018-07-30 14:42:11 CEST
A customer reported the following traceback after upgrading his UCS. He has not modified the user.
-----------------------------------------------------------------------------
27.07.2018 10:03:14,870 LDAP (INFO ): __set_values: mapping for attribute: mailPrimaryAddress
27.07.2018 10:03:14,870 LDAP (INFO ): __set_values: set attribute, ucs_key: mailPrimaryAddress - value: [u'T.Schein@example.de']
27.07.2018 10:03:14,871 LDAP (INFO ): __set_values: module users/user has no custom attributes
27.07.2018 10:03:14,871 MAIN (------ ): UNIVENTION_DEBUG_BEGIN : proxyAddesses.equal
27.07.2018 10:03:14,871 LDAP (ALL ): proxyAddesses: values1: t.schein@example.de
27.07.2018 10:03:14,871 LDAP (ALL ): proxyAddesses: values2: T.Schein@example.de
27.07.2018 10:03:14,871 MAIN (------ ): UNIVENTION_DEBUG_END : proxyAddesses.equal
27.07.2018 10:03:14,871 LDAP (INFO ): set key in ucs-object: mailPrimaryAddress
27.07.2018 10:03:14,871 MAIN (------ ): UNIVENTION_DEBUG_END : ldap.__set_value
27.07.2018 10:03:14,875 MAIN (------ ): UNIVENTION_DEBUG_BEGIN : ldap._debug_traceback
27.07.2018 10:03:14,875 LDAP (ERROR ): Unknown Exception during sync_to_ucs
27.07.2018 10:03:14,875 LDAP (ERROR ): Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1358, in sync_to_ucs
result = self.modify_in_ucs(property_type, object, module, position)
File "/usr/lib/pymodules/python2.7/univention/connector/__init__.py", line 1195, in modify_in_ucs
return ucs_object.modify() and self.__modify_custom_attributes(property_type, object, ucs_object, module, position)
File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1674, in modify
return super(object, self).modify(*args, **kwargs)
File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 579, in modify
self._ldap_pre_ready()
File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1898, in _ldap_pre_ready
raise univention.admin.uexceptions.mailAddressUsed(self['mailPrimaryAddress'])
mailAddressUsed: T.Schein@example.de
-------------------------------------------------------------------------------

Please find attached to Ticket 2018072721000249 #5 the AD-Connector log with  loglevel 4 and the mapping file.

The connector is in read mode
The customer tested modifing the primary mail address to the notation in UCS LDAP, than the reject disappears. Changing the notation back to AD the rejects comes back.

The customer needs a patch.
More information in the tickets
Comment 1 Arvid Requate univentionstaff 2018-07-30 15:33:28 CEST
Created attachment 9612 [details]
Bug47415_untestet_proposal.patch
Comment 2 Felix Botner univentionstaff 2018-08-14 17:03:30 CEST
I think the patch is OK. We store only the lowercase version of the mailPrimaryAddress in LDAP anyway, so we can this "case only" change.

univention-directory-manager-modules: 01f9e40db0c8aca279078fd4f6e6475d296e32ae
yaml: d5b44b254ae02a1c0fa1c93c64a3b4b095e2416b
Comment 3 Arvid Requate univentionstaff 2018-08-22 13:40:26 CEST
Ok.
Comment 4 Arvid Requate univentionstaff 2018-08-22 14:26:24 CEST
<http://errata.software-univention.de/ucs/4.3/217.html>