Univention Bugzilla – Full Text Bug Listing |
Summary: | container/ou creation fails underneath of not identifyable object: AttributeError: 'NoneType' object has no attribute 'module' | ||
---|---|---|---|
Product: | UCS | Reporter: | Florian Best <best> |
Component: | UDM (Generic) | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Jürn Brodersen <brodersen> |
Severity: | normal | ||
Priority: | P5 | CC: | requate |
Version: | UCS 4.4 | ||
Target Milestone: | UCS 4.4-1-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=49850 https://forge.univention.org/bugzilla/show_bug.cgi?id=50542 |
||
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): | Cleanup, Error handling | |
Max CVSS v3 score: |
Description
Florian Best
2019-05-15 13:18:25 CEST
s4-connector.log: attachment 10121 [details] (Bug #49850). 11.07.2019 16:08:43.127 LDAP (PROCESS): sync to ucs: [ ou] [ delete] ou=ûaqÄ!:Å#ô6,ou=âjiÄ!ß|$ŷâ DEL:d65d295e-0096-40ef-8c78-f658e8197fa4,CN=Deleted Objects,dc=AutoTest091,dc=local 11.07.2019 16:08:43.128 LDAP (WARNING): Object to delete doesn't exsist, ignore (ou=ûaqÄ!:Å#ô6,ou=âjiÄ!ß|$ŷâ DEL:d65d295e-0096-40ef-8c78-f658e8197fa4,CN=Deleted Objects,dc=AutoTest091,dc=local) 11.07.2019 16:08:43.137 LDAP (PROCESS): sync to ucs: [ ou] [ add] ou=gzg85xsewx,ou=uahzm8vm3e,dc=AutoTest091,dc=local 11.07.2019 16:08:43.151 LDAP (ERROR ): Unknown Exception during sync_to_ucs 11.07.2019 16:08:43.164 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1547, in sync_to_ucs result = self.add_in_ucs(property_type, object, module, position) File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1295, in add_in_ucs res = ucs_object.create(serverctrls=serverctrls, response=response) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 550, in create dn = self._create(response=response, serverctrls=serverctrls) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 1217, in _create self._ldap_pre_create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/container/ou.py", line 211, in _ldap_pre_create if m.module == 'container/cn': AttributeError: 'NoneType' object has no attribute 'module' Easily reproducible: # udm container/ou create --position cn=default,cn=ppolicy,cn=univention,l=school,l=dev --set name=foo Traceback (most recent call last): File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 218, in doit output = univention.admincli.admin.doit(arglist) File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 408, in doit out = _doit(arglist) File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 755, in _doit dn = object.create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 550, in create dn = self._create(response=response, serverctrls=serverctrls) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 1217, in _create self._ldap_pre_create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/container/ou.py", line 211, in _ldap_pre_create if m.module == 'container/cn': AttributeError: 'NoneType' object has no attribute 'module' Fixed the broken check. identifyOne() has been replaced with identify() because there might be multiple UDM objects detected (and even None returned e.g. by the first entry if the object has univentionObjectType set but the module doesn't exists on the system). univention-directory-manager-modules (14.0.13-2) b5d5d4c63d5f | Bug #49478: prevent crashing container/ou creation if parent object cannot be identified univention-directory-manager-modules.yaml b5d5d4c63d5f | Bug #49478: prevent crashing container/ou creation if parent object cannot be identified What I tested: Created ou under dc and ou -> OK Created ou under cn -> Error -> OK Jenkins -> OK YAML ->OK -> Verified |