Bug 49959 - ucs-test: ucs_uid = ucs_object.get('uid', [None])[0]: AttributeError: 'NoneType' object has no attribute 'get'
ucs-test: ucs_uid = ucs_object.get('uid', [None])[0]: AttributeError: 'NoneT...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-1-errata
Assigned To: Arvid Requate
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-03 10:46 CEST by Florian Best
Modified: 2019-08-22 15:30 CEST (History)
1 user (show)

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:
requate: Patch_Available+


Attachments
bug49959.patch (882 bytes, patch)
2019-08-04 17:42 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-08-03 10:46:47 CEST
03.08.2019 06:22:04.900 LDAP        (PROCESS): sync from ucs: [windowscomputer] [       add] cn=f6e0i1p5xx,DC=autotest071,DC=local
03.08.2019 06:22:04.947 LDAP        (PROCESS): sync from ucs: [windowscomputer] [    modify] cn=f6e0i1p5xx,DC=autotest071,DC=local
03.08.2019 06:22:04.952 LDAP        (PROCESS): sync from ucs: [         group] [    modify] cn=computers,cn=groups,DC=autotest071,DC=local
03.08.2019 06:22:04.964 LDAP        (PROCESS): sync from ucs: [windowscomputer] [    modify] cn=f6e0i1p5xx,DC=autotest071,DC=local
03.08.2019 06:22:04.969 LDAP        (PROCESS): sync from ucs: [windowscomputer] [    modify] cn=f6e0i1p5xx,DC=autotest071,DC=local
03.08.2019 06:22:06.039 LDAP        (PROCESS): sync to ucs:   [windowscomputer] [    modify] cn=f6e0i1p5xx,dc=AutoTest071,dc=local
03.08.2019 06:22:06.112 LDAP        (ERROR  ): failed in post_con_modify_functions
03.08.2019 06:22:06.113 LDAP        (ERROR  ): Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1577, in sync_to_ucs
    f(self, property_type, object)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/computer.py", line 112, in windowscomputer_sync_s4_to_ucs_check_rename
    ucs_uid = ucs_object.get('uid', [None])[0]
AttributeError: 'NoneType' object has no attribute 'get'
Comment 1 Arvid Requate univentionstaff 2019-08-04 13:41:39 CEST
Looks like the test didn't wait for the sync and already deleted the object in OpenLDAP?
Comment 2 Florian Best univentionstaff 2019-08-04 16:47:31 CEST
Look like, yes.

The lines after the traceback are:
03.08.2019 06:22:06.113 LDAP        (WARNING): sync to ucs was not successfull, save rejected
03.08.2019 06:22:06.114 LDAP        (WARNING): object was: CN=f6e0i1p5xx,DC=autotest071,DC=local
03.08.2019 06:22:11.134 LDAP        (PROCESS): sync from ucs: [windowscomputer] [    modify] cn=f6e0i1p5xx,DC=autotest071,DC=local
03.08.2019 06:22:11.139 LDAP        (PROCESS): sync from ucs: [windowscomputer] [    delete] cn=f6e0i1p5xx,DC=autotest071,DC=local
Comment 3 Arvid Requate univentionstaff 2019-08-04 17:42:35 CEST
Created attachment 10149 [details]
bug49959.patch

This may fix it.
Comment 4 Arvid Requate univentionstaff 2019-08-08 16:32:36 CEST
a9af64e91a | Fix
8dc9a2ed71 | Advisory
Comment 5 Florian Best univentionstaff 2019-08-08 17:57:15 CEST
OK: windowscomputer is ignored
OK: YAML
Comment 6 Arvid Requate univentionstaff 2019-08-22 15:30:15 CEST
<http://errata.software-univention.de/ucs/4.4/239.html>