Univention Bugzilla – Bug 43337
IndexError in check_common_name_length
Last modified: 2017-04-04 18:28:47 CEST
http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/10/SambaVersion=s4,Systemrolle=master/testReport/60_umc-system/80_umc-service-license/test/ Die Ausf\u00fchrung des Kommandos udm/add computers/computer ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/notifier/threads.py", line 82, in _run tmp = self._function() File "/usr/lib/pymodules/python2.7/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/__init__.py", line 367, in _thread dn = module.create(properties, container=options.get('container'), superordinate=options.get('superordinate')) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 86, in _decorated return method(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 386, in create obj.create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 306, in create return self._create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 705, in _create self._ldap_pre_create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/windows.py", line 410, in _ldap_pre_create super(object, self)._ldap_pre_create() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2239, in _ldap_pre_create self.check_common_name_length() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 1684, in check_common_name_length zoneName = univention.admin.uldap.explodeDn(zone[0], 1)[0] IndexError: list index out of range [2017-01-13 10:12:13.296031] *** UMC request: "command/udm/add" (computers/computer) [2017-01-13 10:12:13.296051] data = [{'object': {'$options$': {'kerberos': True, [2017-01-13 10:12:13.296062] 'nagios': False, [2017-01-13 10:12:13.296072] 'posix': True, [2017-01-13 10:12:13.296083] 'samba': True}, [2017-01-13 10:12:13.296092] '$policies$': {}, [2017-01-13 10:12:13.296101] 'dnsEntryZoneForward': [['']], [2017-01-13 10:12:13.296109] 'dnsEntryZoneReverse': [['']], [2017-01-13 10:12:13.296117] 'ip': ['10.210.0.51'], [2017-01-13 10:12:13.296126] 'name': 'umc_test_computer_nukxej_0', [2017-01-13 10:12:13.296135] 'network': 'cn=default,cn=networks,dc=AutoTest091,dc=local', [2017-01-13 10:12:13.296144] 'ntCompatibility': False, [2017-01-13 10:12:13.296154] 'primaryGroup': 'cn=Windows Hosts,cn=groups,dc=AutoTest091,dc=local', [2017-01-13 10:12:13.296162] 'shell': '/bin/false', [2017-01-13 10:12:13.296170] 'unixhome': '/dev/null'}, [2017-01-13 10:12:13.296180] 'options': {'container': 'cn=computers,dc=AutoTest091,dc=local', [2017-01-13 10:12:13.296223] 'objectType': 'computers/windows'}}]
self['dnsEntryZoneForward'] is [[u'']] instead of [u''].
r75789 | Bug #43337: fix wrong usage of UDM The test case set [['']]. Question is why did it work in UCS 4.1-4? I fixed this wrong usage in the test case.
(In reply to Florian Best from comment #2) > r75789 | Bug #43337: fix wrong usage of UDM > The test case set [['']]. > Question is why did it work in UCS 4.1-4? I fixed this wrong usage in the > test case. OK: Further modified by ucs-4.2-0@76119 to be [] OK: Reproducer umc-command -U Administrator -P univention udm/add -f computers/computer -r -e -o '[{"object":{"ip":"1.2.3.4","name":"test43337","dnsEntryZoneForward":[[""]],"dnsEntryZoneReverse":[[""]]},"options":{"container":"cn=computers,dc=phahn,dc=qa","objectType":"computers/windows"}}]' udm computers/windows remove --dn cn=test43337,cn=computers,dc=phahn,dc=qa The difference is caused by ucs-4.2-0@74205 for Bug #16923: # python -c 'import univention.admin.objects;from univention.admin.syntax import *;print dnsEntry.parse([""]),dnsEntryReverse.parse([""])' with ucs-4.0 and ucs-4.1: [] [] with ucs-4.2: [''] [''] OK: /usr/share/ucs-test/60_umc/70_udm_network_functionality -vvvf
UCS 4.2 has been released: https://docs.software-univention.de/release-notes-4.2-0-en.html https://docs.software-univention.de/release-notes-4.2-0-de.html If this error occurs again, please use "Clone This Bug".