Univention Bugzilla – Bug 55549
Traceback in migrate Server Role Windows
Last modified: 2023-01-09 16:23:29 CET
Hitting the migrate button in the diagnostic "Server Role Windows" shows the following traceback: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/univention/management/console/modules/diagnostic/__init__.py", line 270, in execute ret = execute(umc_module, **kwargs) File "/usr/lib/python3/dist-packages/univention/management/console/modules/diagnostic/plugins/57_univention_server_role_windows.py", line 110, in migrate_objects lo.modify(dn, changes) File "/usr/lib/python3/dist-packages/univention/admin/uldap.py", line 806, in modify return self.lo.modify(dn, changes, serverctrls=serverctrls, response=response, rename_callback=rename_callback) File "/usr/lib/python3/dist-packages/univention/uldap.py", line 208, in _decorated return func(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/univention/uldap.py", line 754, in modify self.modify_ext_s(dn, ml, serverctrls=serverctrls, response=response) File "/usr/lib/python3/dist-packages/univention/uldap.py", line 208, in _decorated return func(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/univention/uldap.py", line 813, in modify_ext_s rtype, rdata, rmsgid, resp_ctrls = self.lo.modify_ext_s(dn, ml, serverctrls=serverctrls) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1253, in modify_ext_s return self._apply_method_s(SimpleLDAPObject.modify_ext_s,*args,**kwargs) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 1197, in _apply_method_s return func(self,*args,**kwargs) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 601, in modify_ext_s msgid = self.modify_ext(dn,modlist,serverctrls,clientctrls) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 598, in modify_ext return self._ldap_call(self._l.modify_ext,dn,modlist,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) File "/usr/lib/python3/dist-packages/ldap/ldapobject.py", line 313, in _ldap_call result = func(*args,**kwargs) TypeError: ('Tuple_to_LDAPMod(): expected a byte string in the list', 'w') ---------------- This Patch fixed the issue: diff --git management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/57_univention_server_role_windows.py management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/57_univention index 9a42434d63..dd0cfdcf34 100755 --- management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/57_univention_server_role_windows.py +++ management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/57_univention_server_role_windows.py @@ -106,7 +106,7 @@ def migrate_objects(_umc_instance: Instance) -> None: if not server_role: continue for dn in objs[server_role]: - changes = [('univentionServerRole', None, server_role)] + changes = [('univentionServerRole', None, server_role.encode('UTF-8'))] lo.modify(dn, changes) raise ProblemFixed(buttons=[])