Univention Bugzilla – Bug 55568
pre-update-check script fails on UCS 4.4
Last modified: 2023-01-16 18:43:52 CET
Customers with UCS 4.4-9 non-school domains follow https://docs.software-univention.de/release-notes/5.0-2/en/index.html and download and run pre-update-checks-5.0-2 . The test "update_check_required_ucsschool_version" fails in that case and asks to install UCS@school: ===== root@master60:~# update_check_required_ucsschool_version () { # Bug #54883 Bug #54896 > if ! python3 -c ' > import sys > from distutils.version import LooseVersion > from univention.appcenter.app_cache import Apps > ucsschool = Apps().find("ucsschool") > > if ucsschool.is_installed(): > sys.exit(LooseVersion(ucsschool.version) <= LooseVersion("5.0 v1")) > '; then > echo "UCS@school is installed. To upgrade to UCS 5.0-2 as least UCS@school 5.0 v2 is required." > echo "Please upgrade the UCS@school app first!" > return 1 > fi > } root@master60:~# update_check_required_ucsschool_version Traceback (most recent call last): File "<string>", line 4, in <module> ImportError: No module named 'univention.appcenter' UCS@school is installed. To upgrade to UCS 5.0-2 as least UCS@school 5.0 v2 is required. Please upgrade the UCS@school app first! root@master60:~# univention-app info UCS: 4.4-9 errata1334 Installed: cups=2.2.1 pkgdb=11.0 samba4=4.10 Upgradable: ===== The script should either work on UCS 4.4 (preferably) or check the version and instruct customers to run the connect script. I prefer the first solution.
The pre-update-check script could/should(?) tell the admin that he is not executing the correct script, because on UCS 4.4-9 the UCS 5.0-0 pre-update check script has to be executed.
(In reply to Arvid Requate from comment #0) > The script should either work on UCS 4.4 (preferably) or check the version > and instruct customers to run the connect script. I prefer the first > solution. I think they should download "pre-update-checks-5.0-0" instead of "pre-update-checks-5.0-2" because that version is only ensured and tested to work in UCS 5.0-0. This is also what (I think and hope) the updater would do. And there could be in the future other checks which also break. When we release UCS 5.0-3 we don't want to keep that backwards compatibility in mind. And we currently don't the upgrade from UCS 4.4 explicitly again on such changes/releases.
(In reply to Erik Damrose from comment #1) > The pre-update-check script could/should(?) tell the admin that he is not > executing the correct script, because on UCS 4.4-9 the UCS 5.0-0 pre-update > check script has to be executed. good idea imho and additionally we could make more clear in the release notes of UCS 5.0-2 etc. that this is only the release noted for upgrading from UCS 5.0-1 and that users coming from UCS 4.4 should look at the UCS 5.0-0 release notes.
I understand that this may be the only way to go, technically, but from a customer usability perspective I think we have a conflict then between on the one hand offering customers those version specific separate pre-update-check scripts, and on the other hand the behavior of univention-update which offers continuous updating. If users want to plan e.g. an update from UCS 4.4-9 to 5.0-2 ahead of time, then the only option they have is to use a test-environment and actually run the update. The separate pre-update-check scripts advertised in the release notes loose their practical use. Except if you follow UCS development closely and update one Release-update (major or minor) at a time.
hm, but using only the UCS 5.0-2 upgrade check does not work at all because there the specific upgrade-check-functions from UCS 5.0-0 are already removed. At least the customer have to use all checks from UCS 5.0-0, UCS 5.0-1 and UCS 5.0-2.
Sure, that's true.
if you have 5.0-2 checks which are necessary/good to have in 5.0-0 already we can also backport them and adjust them so that they work with UCS 4.4. update_check_required_ucsschool_version doesn't make sense to be executed on UCS 4.4 as this is not possible to return true.