Bug 41310

Summary: add compare_function=univention.s4connector.compare_lowercase to "cn" mapping for msPrintConnectionPolicy
Product: UCS Reporter: Felix Botner <botner>
Component: S4 ConnectorAssignee: Felix Botner <botner>
Status: CLOSED FIXED QA Contact: Stefan Gohmann <gohmann>
Severity: normal    
Priority: P5    
Version: UCS 4.0   
Target Milestone: UCS 4.0-5-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.103 Enterprise Customer affected?:
School Customer affected?: Yes ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: 2016052021000269 Bug group (optional):
Max CVSS v3 score:
Bug Depends on: 41309    
Bug Blocks:    

Description Felix Botner univentionstaff 2016-05-20 12:38:34 CEST
+++ This bug was initially created as a clone of Bug #41309 +++

Ticket 2016052021000269

If the cn in msPrintConnectionPolicy objects is "case-different" between s4 and ucs, we get

20.05.2016 12:16:04,174 LDAP        (PROCESS): sync to ucs:   [msPrintConnectionPolicy] [    modify] cn={173b52fb-7c5a-4154-bbb7-5bebd3474822},cn=pushedprinterconnections,cn=machine,cn={31b2f340-016d-11d2-945f-00c04fb984f9},cn=policies,cn=system,dc=w2k12,dc=test
20.05.2016 12:16:04,182 LDAP        (ERROR  ): Unknown Exception during sync_to_ucs
20.05.2016 12:16:04,183 LDAP        (ERROR  ): Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1460, in sync_to_ucs
    result = self.modify_in_ucs(property_type, object, module, position)
  File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1237, 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/__init__.py", line 363, in modify
    return self._modify(modify_childs,ignore_license=ignore_license)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 831, in _modify
    self._ldap_pre_modify()
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/settings/msprintconnectionpolicy.py", line 168, in _ldap_pre_modify
    self.move(newdn)
  File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 415, in move
    raise univention.admin.uexceptions.ldapError, _('Moving not possible: old and new DN are identical.')
ldapError: Moving not possible: old and new DN are identical.

Turns out that the mapping for msPrintConnectionPolicy is missing the compare_function=univention.s4connector.compare_lowercase for the cn attribute.

for 4.1-2 and 4.0-5
Comment 1 Felix Botner univentionstaff 2016-05-20 12:57:58 CEST
fixed, add compare_function=univention.s4connector.compare_lowercase to cn attribute in msPrintConnectionPolicy mapping

univention-s4-connector.yaml
Comment 2 Stefan Gohmann univentionstaff 2016-06-01 07:24:54 CEST
Code review: OK

Tests: OK

Tests (jenkins): OK

YAML: OK
Comment 3 Janek Walkenhorst univentionstaff 2016-06-01 17:28:11 CEST
<http://errata.software-univention.de/ucs/4.0/435.html>