Bug 40027 - Update not possible when UCS Master can't be reached via SSH
Update not possible when UCS Master can't be reached via SSH
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Philipp Hahn
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-18 19:57 CET by Jan Christoph Ebersbach
Modified: 2021-05-25 16:00 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.143
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback, Troubleshooting
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Christoph Ebersbach univentionstaff 2015-11-18 19:57:00 CET
I ran into the following error message when I tried to update my Memberserver to UCS 4.1.

root@web:~# univention-upgrade --ignoressh --ignoreterm

Starting univention-upgrade. Current UCS version is 4.0-4 errata363

Checking for local repository:                          none
Checking for release updates:                           found: UCS 4.1-0

Do you want to update to 4.1-0 [Y|n]? y

Starting update to UCS version 4.1-0

HINT:
Please check the release notes carefully BEFORE updating to UCS 4.1-0:
 English version: https://docs.software-univention.de/release-notes-4.1-0-en.html
 German version:  https://docs.software-univention.de/release-notes-4.1-0-de.html

Please also consider documents of following release updates and
3rd party components.

Do you want to continue [Y/n]? y

Checking for space on /var/cache/apt/archives: OK
Checking for space on /boot: OK
Checking for space on /: OK
Checking for package status: OK
Traceback (most recent call last):
  File "<string>", line 3, in <module>
  File "/usr/lib/pymodules/python2.7/univention/lib/ucs.py", line 21, in __init__
    self.set( version )
  File "/usr/lib/pymodules/python2.7/univention/lib/ucs.py", line 53, in set
    raise ValueError( 'string does not match UCS version pattern: %s' % version)
ValueError: string does not match UCS version pattern: -
WARNING: Your domain controller master is still on version -.
         It is strongly recommended that the domain controller master is
         always the first system to be updated during a release update.
This check can be skipped by setting the UCR
variable update41/ignore_version to yes.
Error: Please check "/var/log/univention/updater.log" for details.
ERROR: update failed. Please check /var/log/univention/updater.log


The reason is that I changed the SSH key on the Master some time ago and I forgot to delete the old entry from /root/.ssh/known_hosts.  It took quite some time to figure out that the preup script failed (lines 327 and 328) because it doesn't ignore the contents of the known_hosts file.  I'd suggest to adjust the ssh calls and work around any local ssh configuration.
Comment 1 Jeff Moody 2017-05-11 21:54:24 CEST
Thank you for pointing out that this error was caused by an inability to SSH from the other node into the master. Once I resolved that issue, the upgrade is running as expected.

It would be nice if the error was more explicit about what the error is rather than the generic messaging currently used.
Comment 2 Ingo Steuwer univentionstaff 2020-07-03 20:52:36 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Comment 3 Philipp Hahn univentionstaff 2020-07-04 09:50:14 CEST
Actually this is a major pain and has lead to dead-locks in the past, when the Master is unreachable.
Comment 4 Philipp Hahn univentionstaff 2020-10-03 18:33:39 CEST
preup.sh already checked at that point, that LDAP is working, which also stores the version. Fetch it from there instead of using ssh.

[5.0-0] f01df2f8b7 Bug #40027 up: Get Primary version from LDAP
 .../checks/pre-update-checks-5.0                   | 11 +++---
 base/univention-updater/debian/changelog           |  6 ++++
 base/univention-updater/script/preup.sh            | 42 ++++++++++++----------
 doc/changelog/changelog-5.0-0.xml                  |  3 ++
 4 files changed, 38 insertions(+), 24 deletions(-)

Package: univention-updater
Version: 15.0.1-4A~5.0.0.202010031832
Branch: ucs_5.0-0
Comment 5 Felix Botner univentionstaff 2021-02-16 14:14:47 CET
OK - checks.sh::update_check_master_version
OK - changelog
Comment 6 Florian Best univentionstaff 2021-05-25 16:00:16 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".