Univention Bugzilla – Bug 28145
Traceback beim Anlegen einer Gruppe ohne Option Posix und ohne Option Samba
Last modified: 2018-04-13 13:28:41 CEST
Traceback beim Anlegen einer Gruppe ohne Option Posix und ohne Option Samba: ============================================================================ File '/usr/lib/pymodules/python2.6/notifier/threads.py', line 82, in _run tmp = self._function() File '/usr/lib/pymodules/python2.6/notifier/__init__.py', line 104, in __call__ return self._function( *tmp, **self._kwargs ) File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py', line 267, in _thread dn = module.create( properties, container = options.get( 'container' ), superordinate = options.get( 'superordinate' ) ) File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 139, in wrapper_func ret = func( *args, **kwargs ) File '/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py', line 321, in create obj.create() File '/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py', line 332, in create return self._create() File '/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py', line 603, in _create self._ldap_pre_create() File '/usr/lib/pymodules/python2.6/univention/admin/handlers/groups/group.py', line 503, in _ldap_pre_create self.dn='%s=%s,%s' % (mapping.mapName('name'), mapping.mapValue('name', self.info['name']), self.position.getDn()) KeyError: 'name' ============================================================================
*** Bug 29678 has been marked as a duplicate of this bug. ***
*** Bug 25278 has been marked as a duplicate of this bug. ***
Created attachment 5826 [details] Fix missing objectClasses Again. A group without at leas a name is not very practical, so always show the name. Without POSIX and Samba, the object has no STRUCTURAL objectClass. The Samba case already just uses "organizationalRole", as this objectClass is structural and has 'cn' as a MUST attribute. Also "gidNumber" is stored unconditionally, which requires at least POSIX or samba.
(In reply to Philipp Hahn from comment #3) > Created attachment 5826 [details] > Fix missing objectClasses > - self['users']=self['hosts']=self['nestedGroup']=[] > + self['users'] = [] > + self['hosts'] = [] > + self['nestedGroup'] = [] → Are you sure about this? The old behavior was that all of the keys are the same list/reference. Now they are 3 different lists.
(In reply to Florian Best from comment #4) > (In reply to Philipp Hahn from comment #3) > > Created attachment 5826 [details] > > Fix missing objectClasses > > > - self['users']=self['hosts']=self['nestedGroup']=[] > > + self['users'] = [] > > + self['hosts'] = [] > > + self['nestedGroup'] = [] > → Are you sure about this? The old behavior was that all of the keys are the > same list/reference. Now they are 3 different lists. That was exactly what confused me too, as the original version looks totally bogus: The whole logic in groups/groups would be pointless, as it tries to partition the members of the group into users, sub-groups and hosts. It only looks like the 3 properties all reference the same list, but only through adding debugging output you see that this isn't true. It is only through the (confusing) implementation of univention.admin.handler.__init__.py # base.__setitem__ that it works: there in line 232 through »self.info[key]=[]« the property is always initialized with a new list into which the elements are appended.
Reported as traceback feedback, 4.0-1 errata160 (Walle). Die Ausführung des Kommandos udm/add groups/group ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/modules/__init__.py", line 176, in _decorated return function(self, request, *args, **kwargs) 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 374, in _thread dn = module.create(properties, container=options.get('container'), superordinate=options.get('superordinate')) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 163, in _decorated return func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 146, in wrapper_func return _func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 139, in _func ret = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 491, in create obj.create() File "%PY2.7%/univention/admin/handlers/__init__.py", line 352, in create return self._create() File "%PY2.7%/univention/admin/handlers/__init__.py", line 685, in _create self._ldap_pre_create() File "%PY2.7%/univention/admin/handlers/groups/group.py", line 529, in _ldap_pre_create self.dn='%s=%s,%s' % (mapping.mapName('name'), mapping.mapValue('name', self.info['name']), self.position.getDn()) KeyError: 'name'
*** Bug 37561 has been marked as a duplicate of this bug. ***
(In reply to Florian Best from comment #7) > *** Bug 37561 has been marked as a duplicate of this bug. *** Tagging to the TM of that duplicate. Patch_available from Philipp is at comment #3.
Reported again, 4.0-4 errata399 (Walle) Remark: Der Fehler ist direkt nach der Installation beim Anlegen einer neuen Gruppe aufgetreten.
This is part of svn r70450. *** This bug has been marked as a duplicate of bug 41580 ***