UCS Version: 5.0-2 errata508 Internal server error during "schoolwizards/computers/query (schoolwizards/computers)". KeyError: 'ucsschoolRole' elif key not in self.__no_default and self.descriptions[key].editable: File "/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", line 478, in __getitem__ udm_value = udm_obj[attr.udm_name] File "/usr/lib/python3/dist-packages/ucsschool/lib/models/base.py", line 1025, in from_udm_obj obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) File "/usr/lib/python3/dist-packages/ucsschool/lib/models/computer.py", line 421, in from_udm_obj return klass.from_udm_obj(udm_obj, school, lo) File "/usr/lib/python3/dist-packages/ucsschool/lib/models/base.py", line 1015, in from_udm_obj obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) File "/usr/lib/python3/dist-packages/ucsschool/lib/models/computer.py", line 421, in from_udm_obj ret.append(cls.from_udm_obj(udm_obj, school, lo)) File "/usr/lib/python3/dist-packages/ucsschool/lib/models/base.py", line 938, in get_all school_prefix=school_prefix, File "/usr/lib/python3/dist-packages/univention/management/console/modules/schoolwizards/__init__.py", line 458, in _get_all computer_class, school, request.options.get("filter"), ldap_user_read, school_prefix=False File "/usr/lib/python3/dist-packages/univention/management/console/modules/schoolwizards/__init__.py", line 555, in get_computers return func(*args, **kwargs) File "/usr/lib/python3/dist-packages/ucsschool/lib/school_umc_ldap_connection.py", line 156, in wrapper_func ret = func(self, request, *a, **kw) File "/usr/lib/python3/dist-packages/univention/management/console/modules/schoolwizards/__init__.py", line 241, in _decorated return function(self, request) File "/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", line 184, in _response function.__func__(self, request, *args, **kwargs) File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 250, in execute raise value File "/usr/lib/python3/dist-packages/six.py", line 693, in reraise six.reraise(etype, exc, etraceback) File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 347, in __error_handling Traceback (most recent call last): Request: schoolwizards/computers/query (schoolwizards/computers) Internal server error during "schoolwizards/computers/query (schoolwizards/computers)".
this may be a new incarnation of the (unresolved) issue described in Bug 52746 at least it was reported by the same customer Because of https://forge.univention.org/bugzilla/show_bug.cgi?id=52746#c1 I have cleaned up all errors reported by "/usr/share/ucs-school-import/scripts/fix_ucsschool_roles --dry-run" There have been some obviuosly wrong duplicate role-assigments which are removed now. Unfortunately it is hard to say from the traceback which object is causing the problem. some candidates (possibly incomplete) objectClass=ucsschoolComputer: ucsschoolrole: "ip_computer:school:-" ucsschoolrole: "ubuntu_computer:school:(redacted_existingschool)" objectClass=ucsschoolServer 62 systems without any ucsschoolrole
Some ideas: ``` univention-ldapsearch "(&(objectClass=ucsschoolComputer)(!(ucsschoolRole=*)))" univention-ldapsearch "(&(objectClass=ucsschoolServer)(!(ucsschoolRole=*)))" ``` Those school computers look good. Even if the ucsschoolrole were wrong, the traceback mentions a KeyError, so we are looking for objects without the ucsschoolrole attribute at all. The 62 ucsschoolServer without any ucsschoolRole do look suspicious...
There are no systems matching "(&(objectClass=ucsschoolComputer)(!(ucsschoolRole=*)))" anymore, univention-ldapsearch "(&(objectClass=ucsschoolServer)(!(ucsschoolRole=*)))" is matching to some memberservers in schools (mostly OPSI-servers). The error appears when selecting Schools:all and Computers:All as well as with *some* schools and Computers:All. Fixing ucsschoolRole for one affected school did unfortunately not solve the problem for this school. On the other side there is one memberserver without ucsschoolrole in a scholl where the error doesnt appear. Sidenote for completeness: There are some Ubuntu-Computers in Schools but it there is no indication that this is a problem in general. Ubuntu-Computers may be shown with the filter "Computers:All" at least in schools where the error is absent.
Version: 5.0-2 errata556 - UCS@school 5.0 v3 Error: Interner Server-Fehler in "schoolwizards/computers/query (schoolwizards/computers)". Request: schoolwizards/computers/query (schoolwizards/computers) Traceback (most recent call last): File "%PY3%/univention/management/console/base.py", line 347, in __error_handling six.reraise(etype, exc, etraceback) File "%PY3%/six.py", line 693, in reraise raise value File "%PY3%/univention/management/console/base.py", line 250, in execute function.__func__(self, request, *args, **kwargs) File "%PY3%/univention/management/console/modules/decorators.py", line 184, in _response return function(self, request) File "%PY3%/univention/management/console/modules/schoolwizards/__init__.py", line 241, in _decorated ret = func(self, request, *a, **kw) File "%PY3%/ucsschool/lib/school_umc_ldap_connection.py", line 156, in wrapper_func return func(*args, **kwargs) File "%PY3%/univention/management/console/modules/schoolwizards/__init__.py", line 555, in get_computers computer_class, school, request.options.get("filter"), ldap_user_read, school_prefix=False File "%PY3%/univention/management/console/modules/schoolwizards/__init__.py", line 458, in _get_all school_prefix=school_prefix, File "%PY3%/ucsschool/lib/models/base.py", line 938, in get_all ret.append(cls.from_udm_obj(udm_obj, school, lo)) File "%PY3%/ucsschool/lib/models/computer.py", line 424, in from_udm_obj obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) File "%PY3%/ucsschool/lib/models/base.py", line 1015, in from_udm_obj return klass.from_udm_obj(udm_obj, school, lo) File "%PY3%/ucsschool/lib/models/computer.py", line 424, in from_udm_obj obj = super(SchoolComputer, cls).from_udm_obj(udm_obj, school, lo) File "%PY3%/ucsschool/lib/models/base.py", line 1025, in from_udm_obj udm_value = udm_obj[attr.udm_name] File "%PY3%/univention/admin/handlers/__init__.py", line 478, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'ucsschoolRole' Role: domaincontroller_master
@Dirk I understood that this seems to be the same as https://forge.univention.org/bugzilla/show_bug.cgi?id=52746 but it does not happen always. Is this blocking you or do you have a workaround?
To fix this, run `/usr/share/ucs-school-import/scripts/fix_ucsschool_slaves`. The root of this bug appears to be fixed (https://forge.univention.org/bugzilla/show_bug.cgi?id=50280) so it should not happen again after running the mentioned script.
*** This bug has been marked as a duplicate of bug 52746 ***