Univention Bugzilla – Bug 37667
traceback when receiving policies
Last modified: 2015-11-17 12:11:47 CET
I tried to reproduce this (e.g. similar to Bug #34539 ?) but could not. 4.0-0 errata66 (Walle) Traceback: Execution of command 'udm/object/policies shares/share' has failed: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/modules/__init__.py", line 176, in _decorated return function(self, request, *args, **kwargs) 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 1104, in _thread policy_obj.clone(obj) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2786, in clone self.copyIdentifier( referring_object ) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2770, in copyIdentifier for key, property in from_object.descriptions.items(): AttributeError: 'NoneType' object has no attribute 'descriptions'
Reported again, 4.0-1 errata113 (Walle) 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 1104, in _thread policy_obj.clone(obj) File "%PY2.7%/univention/admin/handlers/__init__.py", line 2786, in clone self.copyIdentifier( referring_object ) File "%PY2.7%/univention/admin/handlers/__init__.py", line 2770, in copyIdentifier for key, property in from_object.descriptions.items(): AttributeError: 'NoneType' object has no attribute 'descriptions'
Reported again, 4.0-1 errata113 (Walle), (different UUID)
We could add the information which policy type was requested to the error information.
I also found this in the logfiles of demo.univention.de twice → 4.0-0-errata-0 (the update failed today)
24.03.15 09:01:57.829 MAIN ( PROCESS ) : CPCommand (41.150.108.242:45943) response status code: 590 24.03.15 09:01:57.829 MAIN ( PROCESS ) : CPCommand (41.150.108.242:45943) response message: 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 360, 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 184, in wrapper_func ret = func( *args, **kwargs ) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/udm/udm_ldap.py", line 347, in create raise UMC_CommandError( str( e ) ) UMC_CommandError: DN not found: . 24.03.15 09:01:57.829 MAIN ( PROCESS ) : CPCommand (41.150.108.242:45943) response result: None 24.03.15 09:02:56.132 MAIN ( PROCESS ) : CPCommand (41.150.108.242:46319) response status code: 590 24.03.15 09:02:56.132 MAIN ( PROCESS ) : CPCommand (41.150.108.242:46319) response message: 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 1086, in _thread policy_obj.clone(obj) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2772, in clone self.copyIdentifier( referring_object ) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2756, in copyIdentifier for key, property in from_object.descriptions.items(): AttributeError: 'NoneType' object has no attribute 'descriptions' 24.03.15 09:02:56.132 MAIN ( PROCESS ) : CPCommand (41.150.108.242:46319) response result: None 24.03.15 09:02:56.310 MAIN ( PROCESS ) : CPCommand (41.150.108.242:46320) response status code: 590 24.03.15 09:02:56.310 MAIN ( PROCESS ) : CPCommand (41.150.108.242:46320) response message: 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 1086, in _thread policy_obj.clone(obj) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2772, in clone self.copyIdentifier( referring_object ) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 2756, in copyIdentifier for key, property in from_object.descriptions.items(): AttributeError: 'NoneType' object has no attribute 'descriptions'
Reproducible: execute the following code in the JS console and open the policies tab then: umc.app.openModule('udm', 'navigation', { newObject: { objectType: 'dns/forward_zone' } })
Reported again, 4.0-1 errata160 (Walle), udm/object/policies shares/share
umc-client -s 10.200.27.70 -U Administrator -P univention COMMAND udm/object/policies -f shares/print -e -o '[{"objectType":"shares/printer","policies":[],"policyType":"policies/print_quota","objectDN":None,"container":None}]' Happened if no policy was given or the given policy did not exists. *** This bug has been marked as a duplicate of bug 36256 ***
There still seems to be a case where this happens. We received the following traceback, 4.0-3 errata288 (Walle). Remark: Attempting to join a different domain → I don't understand the remark. Execution of command 'udm/object/policies computers/computer' has failed: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 207, 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 1117, in _thread policy_obj.clone(obj) File "%PY2.7%/univention/admin/handlers/__init__.py", line 2790, in clone self.copyIdentifier( referring_object ) File "%PY2.7%/univention/admin/handlers/__init__.py", line 2774, in copyIdentifier for key, property in from_object.descriptions.items(): AttributeError: 'NoneType' object has no attribute 'descriptions'
Reproducible: umc-client -s master501.deadlock50.intranet -U Administrator -P univention COMMAND udm/object/policies -f users/user -e -o '[{"objectType":"users/user","policies":[],"policyType":"policies/pwhistory","objectDN":None,"container":None}]
This was unfixed due to the revert in svn r61344. I added the check if every argument is None. univention-management-console-module-udm (6.0.4-1): r63373 | Bug #37667: fix traceback when receiving policies for a not existing object
You are now testing: if not policy_dns and not object_dn and not container_dn But you should test: if obj is None as this is the actual reason for the traceback. You only test what you think might lead to "obj is None". As it is now, this still causes the traceback: umc-client -s master50 -U Administrator -P univention COMMAND udm/object/policies -f users/user -e -o '[{"objectType":"users/user","policies":["cn=default-settings,cn=pwhistory,cn=users,cn=policies,dc=dirk,dc=singlemaster,dc=intranet"],"policyType":"policies/pwhistory","objectDN":None,"container":None}]'
(In reply to Dirk Wiesenthal from comment #12) > You are now testing: > if not policy_dns and not object_dn and not container_dn > > But you should test: > if obj is None > > as this is the actual reason for the traceback. You only test what you think > might lead to "obj is None". As it is now, this still causes the traceback: yes :) fixed in svn r65314.
OK Changelog adjusted
Reported agaon, 4.0-3 errata285 (Walle)
UCS 4.1 has been released: https://docs.software-univention.de/release-notes-4.1-0-en.html https://docs.software-univention.de/release-notes-4.1-0-de.html If this error occurs again, please use "Clone This Bug".