Bug 55568 - pre-update-check script fails on UCS 4.4
pre-update-check script fails on UCS 4.4
Status: NEW
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on: 54883
Blocks:
  Show dependency treegraph
 
Reported: 2023-01-13 09:48 CET by Arvid Requate
Modified: 2023-01-16 18:43 CET (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): UCS Performance
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2023-01-13 09:48:57 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.
Comment 1 Erik Damrose univentionstaff 2023-01-13 09:58:28 CET
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.
Comment 2 Florian Best univentionstaff 2023-01-13 10:02:11 CET
(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.
Comment 3 Florian Best univentionstaff 2023-01-13 10:09:08 CET
(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.
Comment 4 Arvid Requate univentionstaff 2023-01-13 12:00:31 CET
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.
Comment 5 Florian Best univentionstaff 2023-01-13 12:08:13 CET
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.
Comment 6 Arvid Requate univentionstaff 2023-01-13 15:43:55 CET
Sure, that's true.
Comment 7 Florian Best univentionstaff 2023-01-16 18:43:52 CET
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.