Bug 46940 - udm/put (computers/computer): AttributeError: 'NoneType' object has no attribute 'lower'
udm/put (computers/computer): AttributeError: 'NoneType' object has no attrib...
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC - Computers
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-03 14:32 CEST by Johannes Keiser
Modified: 2021-01-08 14:00 CET (History)
2 users (show)

See Also:
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?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018052421000785, 2018040521000992, 2020120921000161
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Keiser univentionstaff 2018-05-03 14:32:10 CEST
Version: 4.3-0 errata11 (Neustadt)

Remark: Trying to add IPv6 Addresses to UCS Computer Inventory.

Internal server error during "udm/put (computers/computer)".
Request: udm/put (computers/computer)

Traceback (most recent call last):
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 407, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 83, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 454, in modify
    obj.modify()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 526, in modify
    dn = self._modify(modify_childs, ignore_license=ignore_license, response=response)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 1076, in _modify
    self._ldap_post_modify()
  File "%PY2.7%/univention/admin/handlers/computers/domaincontroller_master.py", line 548, in _ldap_post_modify
    univention.admin.handlers.simpleComputer._ldap_post_modify(self)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 2305, in _ldap_post_modify
    self.__remove_dns_forward_object(self['name'], None, entry)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 1971, in __remove_dns_forward_object
    zone = self.lo.parentDn(zoneDn)
  File "%PY2.7%/univention/admin/uldap.py", line 553, in parentDn
    return self.lo.parentDn(dn)
  File "%PY2.7%/univention/uldap.py", line 582, in parentDn
    return parentDn(dn, self.base)
  File "%PY2.7%/univention/uldap.py", line 45, in parentDn
    if dn.lower() == base.lower():
AttributeError: 'NoneType' object has no attribute 'lower'

Role: domaincontroller_master
Comment 1 Johannes Keiser univentionstaff 2018-05-25 17:58:00 CEST
Reported again: Version: 4.3-0 errata87 (Neustadt)

Interner Server-Fehler in "udm/put (computers/computer)".
Request: udm/put (computers/computer)

Traceback (most recent call last):
  File "%PY2.7%/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 407, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 83, in _decorated
    return method(*args, **kwargs)
  File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated
    result = func(*args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 454, in modify
    obj.modify()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 526, in modify
    dn = self._modify(modify_childs, ignore_license=ignore_license, response=response)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 1076, in _modify
    self._ldap_post_modify()
  File "%PY2.7%/univention/admin/handlers/computers/ipmanagedclient.py", line 270, in _ldap_post_modify
    univention.admin.handlers.simpleComputer._ldap_post_modify(self)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 2305, in _ldap_post_modify
    self.__remove_dns_forward_object(self['name'], None, entry)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 1971, in __remove_dns_forward_object
    zone = self.lo.parentDn(zoneDn)
  File "%PY2.7%/univention/admin/uldap.py", line 553, in parentDn
    return self.lo.parentDn(dn)
  File "%PY2.7%/univention/uldap.py", line 582, in parentDn
    return parentDn(dn, self.base)
  File "%PY2.7%/univention/uldap.py", line 45, in parentDn
    if dn.lower() == base.lower():
AttributeError: 'NoneType' object has no attribute 'lower'
Comment 2 Florian Best univentionstaff 2020-06-22 14:01:02 CEST
Probably fixed with UCS 5.0:

commit abd9e09b0c12e02954ac4df1441b89fd64d45b83 (will change in the official release)
Author: Philipp Hahn <hahn@univention.de>
Date:   Sat Apr 18 13:08:11 2020 +0200

    UDM handlers: Simplify zone processing

    Merge common code.

    [Florian] The 2nd case was a bug: fix zone detection during removal of host record
    >>> s
    <univention.admin.handlers.computers.domaincontroller_slave.object object at 0x7f7218572fd0>
    >>> s.open()
    >>> s.info['dnsEntryZoneForward']
    [['zoneName=school.dev,cn=dns,l=school,l=dev', '10.200.27.2'], ['zoneName=school.dev,cn=dns,l=school,l=dev', '10.200.27.3'], ['zoneName=school.dev,cn=dns,l=school,l=dev', '10.200.27.4']]                                                
    >>> s._simpleComputer__remove_dns_forward_object(s['name'], '', '10.200.27.2')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 2392, in __remove_dns_forward_object                                                                                                                
        zone.modify()
      File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 642, in modify
        raise univention.admin.uexceptions.noObject(self.dn)
    univention.admin.uexceptions.noObject
Comment 3 Christian Castens univentionstaff 2021-01-08 14:00:06 CET
reported again:
Version: 4.4-6 errata829 (Blumenthal)

Remark: Occured while changing IP addresses and (reverse) DNS records.

Error:
Internal server error during "udm/put (computers/computer)".
Request: udm/put (computers/computer)

  File "%PY2.7%/notifier/threads.py", line 80, in _run
    result = self._function()
  File "%PY2.7%/notifier/__init__.py", line 104, in __call__
    return self._function(*tmp, **self._kwargs)
  File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 440, in _thread
    module.modify(properties)
  File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 645, in modify
    obj.modify()
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 650, in modify
    dn = self._modify(modify_childs, ignore_license=ignore_license, response=response)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 1334, in _modify
    self._ldap_post_modify()
  File "%PY2.7%/univention/admin/handlers/computers/ipmanagedclient.py", line 222, in _ldap_post_modify
    univention.admin.handlers.simpleComputer._ldap_post_modify(self)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 2726, in _ldap_post_modify
    self.__remove_dns_forward_object(self['name'], None, entry)
  File "%PY2.7%/univention/admin/handlers/__init__.py", line 2392, in __remove_dns_forward_object
    zone = self.lo.parentDn(zoneDn)
  File "%PY2.7%/univention/admin/uldap.py", line 981, in parentDn
    return self.lo.parentDn(dn)
  File "%PY2.7%/univention/uldap.py", line 904, in parentDn
    return parentDn(dn, self.base)
  File "%PY2.7%/univention/uldap.py", line 61, in parentDn
    if dn.lower() == base.lower():
AttributeError: 'NoneType' object has no attribute 'lower'

Role: domaincontroller_master