Univention Bugzilla – Bug 53181
Join via UMC module for backup/replica/managed node not possible due to failed version check
Last modified: 2021-06-10 08:08:11 CEST
When trying to join a backup/replica/managed node via the UMC "Domain join" module the following error occurs even if primary has same version. The primary and other nodes where all fresh 5.0 installations. ---- The system join process could not be completed: Please visit https://help.univention.com/t/8842 for common problems during the join and how to fix them -- Warning: UCS version on master70.mydomain.intranet is lower () than local version (). This constellation is not supported. More details can be found in the log file /var/log/univention/join.log. Please retry after resolving any conflicting issues. ---- The strings for the version are empty.
https://help.univention.com/t/join-error-an-unexpected-error-occurred-a-bytes-like-object-is-required-not-str/17926/5 might be related, even if it occures on a Backup Node.
(In reply to Ingo Steuwer from comment #2) > https://help.univention.com/t/join-error-an-unexpected-error-occurred-a- > bytes-like-object-is-required-not-str/17926/5 might be related, even if it > occures on a Backup Node. No, it's a different bug but I think it's okay to fix it here. The patch: diff --git management/univention-join/umc/python/join/__init__.py management/univention-join/umc/python/join/__init__.py index 4952c34730..bc103b6dfc 100644 --- management/univention-join/umc/python/join/__init__.py +++ management/univention-join/umc/python/join/__init__.py @@ -178,7 +178,7 @@ def run_join_scripts( cmd = ['/usr/sbin/univention-run-join-scripts'] if username and password: # credentials are provided - passwordFile.write(password) + passwordFile.write(password.encode('UTF-8')) passwordFile.flush() cmd += ['-dcaccount', username, '-dcpwd', passwordFile.name]
MODULE ( WARN ) : Exception during running join scripts: File "/usr/lib/python3/dist-packages/notifier/threads.py", line 80, in _run result = self._function() File "/usr/lib/python3/dist-packages/univention/management/console/modules/join/__init__.py", line 483, in _thread critical_handler=self.progress_state.critical_handler, File "/usr/lib/python3/dist-packages/univention/management/console/modules/join/__init__.py", line 181, in run_join_scripts passwordFile.write(password) File "/usr/lib/python3.7/tempfile.py", line 620, in func_wrapper return func(*args, **kwargs) TypeError: a bytes-like object is required, not 'str'
I had to change univention-ssh to get this working again: https://git.knut.univention.de/univention/ucs/-/merge_requests/103 @QA Please reopen for merge and yaml
This has been fixed in python-daemon: ------------------------------------------------------------------------ r19379 | jbroders | 2021-06-07 13:50:14 +0200 (Mo, 07 Jun 2021) | 1 line Bug #53181: patch -> quilt ------------------------------------------------------------------------ r19378 | jbroders | 2021-06-07 13:48:41 +0200 (Mo, 07 Jun 2021) | 1 line Bug #53181: fix std-stream handling (python >= 3.4) ------------------------------------------------------------------------ python-daemon closed all file descriptors and reopened the standard streams but these were not inheritable (as they should have been). The univention-ssh subprocess was then opened without any standard streams from within the daemon context which broke the output from ssh. [5.0-0 1a995de044] Bug #53181: yaml [5.0-0 8fa4d61f9d] Bug #53181: fix password encoding [5.0-0 cc1de3d1c2] Bug #53181: changelog [5.0-0 704f042131] Bug #53181: yaml [5.0-0 bade72c2ff] Bug #53181: yaml
Functional: OK, join is possible again Code changes: OK YAML: OK
<https://errata.software-univention.de/#/?erratum=5.0x10> <https://errata.software-univention.de/#/?erratum=5.0x11>
(In reply to Jürn Brodersen from comment #6) > This has been fixed in python-daemon: > ------------------------------------------------------------------------ > r19379 | jbroders | 2021-06-07 13:50:14 +0200 (Mo, 07 Jun 2021) | 1 line Files new upstream issue <https://pagure.io/python-daemon/issue/57> and <https://pagure.io/python-daemon/pull-request/58>