Bug 50282 - _remove_subtree_in_s4(): AttributeError: 'NoneType' object has no attribute 'lower'
_remove_subtree_in_s4(): AttributeError: 'NoneType' object has no attribute '...
Status: NEW
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-27 11:21 CEST by Florian Best
Modified: 2019-11-25 18:08 CET (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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-09-27 11:21:34 CEST
In our daily Jenkins Tests I saw this traceback 93 times:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 877, 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 2614, in sync_from_ucs
    self.delete_in_s4(object, property_type)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2672, in delete_in_s4
    if not self.sync_from_ucs(key, subobject_s4, back_mapped_subobject['dn']):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2625, in sync_from_ucs
    self._check_dn_mapping(pre_mapped_ucs_dn, object['dn'])
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 712, in _check_dn_mapping
    self._remove_dn_mapping(dn_ucs.lower(), dn_con_mapped.lower())
AttributeError: 'NoneType' object has no attribute 'lower'

Seems the DN mapping fails for some sub objects.
Comment 1 Florian Best univentionstaff 2019-10-10 12:48:24 CEST
Traceback signature changed:

264 times:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 877, 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 2614, in sync_from_ucs
    self.delete_in_s4(object, property_type)
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2650, in delete_in_s4
    if self._remove_subtree_in_s4(object, property_type):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2683, in _remove_subtree_in_s4
    if not self.sync_from_ucs(key, subobject_s4, back_mapped_subobject['dn']):
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/s4/__init__.py", line 2625, in sync_from_ucs
    self._check_dn_mapping(pre_mapped_ucs_dn, object['dn'])
  File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 712, in _check_dn_mapping
    self._remove_dn_mapping(dn_ucs.lower(), dn_con_mapped.lower())
 AttributeError: 'NoneType' object has no attribute 'lower'