Univention Bugzilla – Bug 41899
Initial setup of extended attribute doesn't work for complex syntax
Last modified: 2021-01-08 13:37:45 CET
- Installed Version: UCS 4.1-2 errata220 - Seems to work at least until: UCS 4.1-1 errata 121 (according to Erik) - Installed cool solution "Quota": http://wiki.univention.de/index.php?title=Cool_Solution_-_Manage_Userquota_in_the_Domain-LDAP - Only failing during initial save. Added initial value with ldap_modify and afterwards all went fine. Modify etc. - Failed in UDM and UMC - Maybe related to Bug 23981. - Got traceback when I try to initially save a extended attribute (quota): Execution of command 'udm/put users/user' has failed: 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 402, in _thread module.modify(properties) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 85, in _decorated return method(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/ldap.py", line 135, in _decorated result = func(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 441, in modify obj.modify() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1564, in modify return super(object, self).modify(*args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 361, in modify return self._modify(modify_childs,ignore_license=ignore_license) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 769, in _modify ml = self._ldap_object_classes(ml) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 824, in _ldap_object_classes newattr = ldap.cidict.cidict(_MergedAttributes(self, ml).get_attributes()) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2821, in get_attributes return dict((attr, self.get_attribute(attr)) for attr in attributes) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2821, in <genexpr>failed return dict((attr, self.get_attribute(attr)) for attr in attributes) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2832, in get_attribute values |= set(new) TypeError: unhashable type: 'list' Log (/var/log/univention/directory-manager-cmd.log) show following: 02.08.16 18:14:47.094 ADMIN ( INFO ) : layout overwrite: tab_descr='None' 02.08.16 18:14:47.094 ADMIN ( INFO ) : ucr_overwrite_module_layout: trying to hide properties on tab Certificate 02.08.16 18:14:47.095 ADMIN ( INFO ) : layout overwrite: tab_layout='None' 02.08.16 18:14:47.095 ADMIN ( INFO ) : layout overwrite: tab_name='None' 02.08.16 18:14:47.095 ADMIN ( INFO ) : layout overwrite: tab_descr='None' 02.08.16 18:14:47.095 ADMIN ( INFO ) : ucr_overwrite_module_layout: trying to hide properties on tab Windows terminal server 02.08.16 18:14:47.096 ADMIN ( INFO ) : layout overwrite: tab_layout='None' 02.08.16 18:14:47.096 ADMIN ( INFO ) : layout overwrite: tab_name='None' 02.08.16 18:14:47.096 ADMIN ( INFO ) : layout overwrite: tab_descr='None' 02.08.16 18:14:47.096 ADMIN ( INFO ) : ucr_overwrite_module_layout: trying to hide properties on tab UCS@school 02.08.16 18:14:47.097 ADMIN ( INFO ) : layout overwrite: tab_layout='None' 02.08.16 18:14:47.097 ADMIN ( INFO ) : layout overwrite: tab_name='None' 02.08.16 18:14:47.097 ADMIN ( INFO ) : layout overwrite: tab_descr='None' 02.08.16 18:14:47.097 ADMIN ( INFO ) : ucr_overwrite_module_layout: trying to hide properties on tab DB 02.08.16 18:14:47.098 ADMIN ( INFO ) : layout overwrite: tab_layout='None' 02.08.16 18:14:47.098 ADMIN ( INFO ) : layout overwrite: tab_name='None' 02.08.16 18:14:47.098 ADMIN ( INFO ) : layout overwrite: tab_descr='None' 02.08.16 18:14:47.098 ADMIN ( INFO ) : ucr_overwrite_module_layout: trying to hide properties on tab Quota 02.08.16 18:14:47.101 ADMIN ( INFO ) : open: module:<univention.admin.handlers.users.user.object object at 0x3207b10> 02.08.16 18:14:47.102 LDAP ( INFO ) : uldap.search filter=(&(cn=*)(|(objectClass=univentionGroup)(objectClass=sambaGroupMapping))(uniqueMember=uid=tquota2,cn=schueler,cn=users,ou=QuotaTest,dc=schulen-fulda,dc=intranet)) base= scope=sub attr=['dn'] unique=0 required=0 timeout=-1 sizelimit=0 02.08.16 18:14:47.102 LDAP ( INFO ) : uldap.search filter=(&(cn=*)(|(objectClass=posixGroup)(objectClass=sambaGroupMapping))(gidNumber=7923)) base= scope=sub attr=['dn'] unique=0 required=0 timeout=-1 sizelimit=0 02.08.16 18:14:47.103 ADMIN ( INFO ) : syntax.py: self.subsyntax[0] is ('Host', <class 'univention.admin.syntax.UCS_Server'>), texts is ['ucs-fileserver.usc-school.intranet', '/', '500', 'MiB'] 02.08.16 18:14:47.104 ADMIN ( INFO ) : syntax.py: self.subsyntax[1] is ('Path', <class 'univention.admin.syntax.OneThirdAbsolutePath'>), texts is ['ucs-fileserver.usc-school.intranet', '/', '500', 'MiB'] 02.08.16 18:14:47.104 ADMIN ( INFO ) : syntax.py: self.subsyntax[2] is ('Quota', <class 'univention.admin.syntax.OneThirdInteger'>), texts is ['ucs-fileserver.usc-school.intranet', '/', '500', 'MiB'] 02.08.16 18:14:47.104 ADMIN ( INFO ) : syntax.py: self.subsyntax[3] is ('Unit', <class 'univention.admin.syntax.siprefix'>), texts is ['ucs-fileserver.usc-school.intranet', '/', '500', 'MiB'] 02.08.16 18:14:47.104 ADMIN ( INFO ) : admin.syntax.hook.simpleHook: _ldap_pre_modify called 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='objectFlag' oc='univentionObject' 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='serviceprovider' oc='univentionSAMLEnabled' 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='externalDBIdentifier' oc='externalDB' 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='externalDBPrimaryKey' oc='externalDB' 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='school' oc='ucsschoolType' 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='ucsschoolSourceUID' oc='ucsschoolType' 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='ucsschoolRecordUID' oc='ucsschoolType' 02.08.16 18:14:47.106 ADMIN ( INFO ) : simpleLdap._modify: extended attribute='domainquota' oc='domainquotauser' 02.08.16 18:14:47.107 ADMIN ( INFO ) : OCS=set(['krb5kdcentry', 'univentionsamlenabled', 'person', 'automount', 'top', 'inetorgperson', 'sambasamaccount', 'shadowaccount', 'organizationalperson', 'domainquotauser', 'univentionpwhistory', 'ucsschoolstudent', 'univentionobject', 'ucsschooltype', 'univentionmail', 'krb5principal', 'posixaccount']); required=set(['domainquotauser', 'ucsschoolType']); removed: set([]) 02.08.16 18:14:47.345 ADMIN ( INFO ) : daemon [9850] connection closed [9855]
I am not sure if this is an error with udm or if the package univention-domain-userquota simply has to be adjusted - note: the package was originally created for UCS 3.1 and has never (!) been adapted. Some change in UDM does however seem to cause it to fail. branches/ucs-3.1/component/cool-solutions/univention-domain-userquota/
Just to make it clear. I agree with Erik that I do not now exactly if it is a udm issue. Probably not. To me it seems like a change in the handling of complex types since UCS 4.1-1 errata 121. But to categorize it as a "cool solution" bug seemed to me not appropriate as well. So, that's why I decided to categorize it as a udm bug. Feel free to change. Changed the title as well to make it explicit.
The complex type is: ldap: domainquota: ucs-fileserver.usc-school.intranet$$/$$200$$MiB udm: Quota: Domain Quota Settings domainquota ([]) Quota settings domainquota: ucs-fileserver.usc-school.intranet / 200 MiB
Created attachment 7867 [details] patch The "domainquota" property doesn't register a mapping-function but instead makes the mapping manually in the hook_ldap_modlist() - the modlist is therefore broken until the hook-function is called but we have code which expects the modlist to be correct. Rearranging the order fixes this. The rearrangement is probably also better.
univention-directory-manager-modules (11.0.3-29): r71611 | Bug #41899: execute hooks before adjusting object classes univention-directory-manager-modules.yaml: r71615 | YAML Bug #41824 Bug #41829 Bug #41899 UCS 4.2: univention-directory-manager-modules (12.0.1-1): r71608 | Bug #41899: execute hooks before adjusting object classes
Code review: OK YAML: OK ucs-test: Waiting for Jenkins Tests: ? I'm currently testing with UCS 4.1-3errata234 and I'm unable to reproduce the issue like described in Comment 0. I've installed the Cool Solution and I've added a new user and set on the quota tab. I don't see any traceback. (In reply to Michel Smidt from comment #0) > - Installed cool solution "Quota": > http://wiki.univention.de/index.php?title=Cool_Solution_- > _Manage_Userquota_in_the_Domain-LDAP > - Only failing during initial save. Added initial value with ldap_modify and > afterwards all went fine. Modify etc. > - Failed in UDM and UMC > - Maybe related to Bug 23981. > - Got traceback when I try to initially save a extended attribute (quota): Any other hints how to reproduce the issue? BTW, I'm unable to reproduce it with the new version either.
To reproduce this the quota settings as well as any option has to be changed.
(In reply to Florian Best from comment #7) > To reproduce this the quota settings as well as any option has to be changed. Tests: OK, I was now able to reproduce it, thanks. It works with the new version. ucs-test: OK
<http://errata.software-univention.de/ucs/4.1/235.html>