Bug 56382 - packaging.version.InvalidVersion: Invalid version: 'Warning: the ECDSA host key for differs from the key for the IP address
packaging.version.InvalidVersion: Invalid version: 'Warning: the ECDSA host k...
Status: NEW
Product: UCS
Classification: Unclassified
Component: System setup
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-07-31 15:08 CEST by Mika Westphal
Modified: 2023-08-01 06:49 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023071521000011
Bug group (optional): bitesize, Error handling, External feedback
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mika Westphal univentionstaff 2023-07-31 15:08:22 CEST
Internal server error during "/univention/command/setup/check/join_info (wizard)".
Request: /univention/command/setup/check/join_info (wizard)

Traceback (most recent call last):
  File "%PY3%/univention/management/console/base.py", line 383, 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 281, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY3%/univention/management/console/modules/decorators.py", line 342, in _response
    result = _multi_response(self, request)
  File "%PY3%/univention/management/console/modules/decorators.py", line 186, in _response
    return function(self, request)
  File "%PY3%/univention/management/console/modules/decorators.py", line 466, in _response
    return list(function(self, iterator, *nones))
  File "%PY3%/univention/management/console/modules/decorators.py", line 308, in _fake_func
    yield function(self, *args)
  File "%PY3%/univention/management/console/modules/setup/__init__.py", line 812, in check_domain_join_information
    result.update(receive_domaincontroller_master_information(dns, nameserver, address, username, password))
  File "%PY3%/univention/management/console/modules/setup/checks/univention_join.py", line 51, in receive_domaincontroller_master_information
    check_domain_is_higher_or_equal_version(address, username, password)
  File "%PY3%/univention/management/console/modules/setup/checks/univention_join.py", line 106, in check_domain_is_higher_or_equal_version
    if Version(nonmaster_ucs_version) > Version(master_ucs_version):
  File "%PY3%/packaging/version.py", line 221, in __init__
    raise InvalidVersion("Invalid version: '{0}'".format(version))
packaging.version.InvalidVersion: Invalid version: 'Warning: the ECDSA host key for '***.***.intra' differs from the key for the IP address '192.168.***.***'
Offending key for IP in /root/.ssh/known_hosts:2
Matching host key in /root/.ssh/known_hosts:3
5.0-4'
Comment 1 Philipp Hahn univentionstaff 2023-07-31 15:23:46 CEST
https://git.knut.univention.de/univention/ucs/-/blob/5.0-4/base/univention-system-setup/umc/python/setup/checks/univention_join.py#L101

@@ -101,1 +101,2 @@
-            master_ucs_version = subprocess.check_output(['univention-ssh', password_file, '%s@%s' % (username, address), 'echo $(/usr/sbin/ucr get version/version)-$(/usr/sbin/ucr get version/patchlevel)'], stderr=subprocess.STDOUT).rstrip().decode('UTF-8', 'replace')
+            cmd = ['univention-ssh', password_file, '%s@%s' % (username, address), 'echo $(/usr/sbin/ucr get version/version)-$(/usr/sbin/ucr get version/patchlevel)']
+            master_ucs_version = subprocess.check_output(cmd, stderr=subprocess.DEVNULL).rstrip().decode('UTF-8', 'replace')

Work-around: remove offending key from /root/.ssh/known_hosts and re-run join.