Bug 52551 - appcenter dependency on UCS errata version breaks installation from DVD during pre-join hook
appcenter dependency on UCS errata version breaks installation from DVD durin...
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v9
Assigned To: Daniel Tröder
Ole Schwiegert
:
Depends on:
Blocks: 52914 52522 52915 52922
  Show dependency treegraph
 
Reported: 2021-01-07 10:05 CET by Daniel Tröder
Modified: 2021-03-24 14:11 CET (History)
3 users (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?: 5: Blocking further progress on the daily work
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2021-01-07 10:05:58 CET
+++ This bug was initially created as a clone of Bug #52214 +++

Same as with Bug #52214, now adapted to current situation:

The errata level on the UCS installation DVD (incl. for UCS 4.4-7) is below the one required by UCS@school 4.4 v9: "4.4-6 errata841".

The pre-join hook, retrieved from the DC master tries to install the same UCS@school version as is installed on the DC master. If that is "4.4 v9", then the installation will abort.

Modify the pre-join hook in a way that in case the required errata level is not met, a previous version (4.4 v8) of UCS@school is installed.
Comment 1 Daniel Tröder univentionstaff 2021-01-08 12:17:43 CET
Fixed in git branch "oschwieg/4.4/veyon_integration" with commit

[7d30f6195] Bug #52551: add errata dependency for 4.4 v9 to pre-join hook

Will be merged to 4.4 and build once the current "ucs-school-metapackage" errata release (12.0.4-6) is out.
Comment 2 Ole Schwiegert univentionstaff 2021-01-12 13:44:24 CET
Looks good and worked in my tests.
Comment 3 Florian Best univentionstaff 2021-01-26 19:59:32 CET
git:3fc762a80014e966ef8c9f0be77dbba6fb1092ee has not been merged to UCS 5.
Comment 4 Ole Schwiegert univentionstaff 2021-03-02 07:54:59 CET
Building fails with

========================== 12 passed in 0.11 seconds ===========================
============================= test session starts ==============================
platform linux -- Python 3.5.3, pytest-3.0.6, py-1.4.32, pluggy-0.4.0 -- /usr/bin/python3
cachedir: .cache
rootdir: /var/build/temp/tmp.BmNl3wQoGF/ucs-school-metapackage-12.0.4, inifile: 
plugins: univention-unittests-1.0.0-8A-4.4.0.202007171018, mock-1.3.0
collecting ... collected 12 items

unittests/test_join_hook.py::test_determine_app_version_lower_than_req_for_44v7 PASSED
unittests/test_join_hook.py::test_determine_app_version_equals_req_for_44v7 PASSED
unittests/test_join_hook.py::test_determine_app_version_higher_than_req_for_44v7 PASSED
unittests/test_join_hook.py::test_determine_app_version_lower_than_req_for_44v9 FAILED
unittests/test_join_hook.py::test_determine_app_version_equals_req_for_44v9 PASSED
unittests/test_join_hook.py::test_determine_app_version_higher_than_req_for_44v9 PASSED
unittests/test_join_hook.py::test_install_veyon_app[<empty list>] PASSED
unittests/test_join_hook.py::test_install_veyon_app[ucs-school-master] PASSED
unittests/test_join_hook.py::test_install_veyon_app[ucs-school-singlemaster] PASSED
unittests/test_join_hook.py::test_install_veyon_app[ucs-school-slave] PASSED
unittests/test_join_hook.py::test_install_veyon_app[ucs-school-nonedu-slave] PASSED
unittests/test_join_hook.py::test_install_veyon_app[ucs-school-central-slave] PASSED

=================================== FAILURES ===================================
______________ test_determine_app_version_lower_than_req_for_44v9 ______________

join_hook_module = <module 'ucsschool-join-hook' from '/var/build/temp/tmp.BmNl3wQoGF/ucs-school-metapackage-12.0.4/ucsschool-join-hook.py'>

    def test_determine_app_version_lower_than_req_for_44v9(join_hook_module):
        primary_node_app_version = "4.4 v9"
        for local_errata_version in ("3.1.2-999", "4.4.6-999", "4.4.7-840"):
            package.version = local_errata_version
            with mock.patch.object(join_hook_module, "log") as log_mock:
                result_version = join_hook_module.determine_app_version(
                    primary_node_app_version, package_manager
                )
>               assert result_version == "4.4 v8"
E               assert '4.4 v6' == '4.4 v8'
E                 - 4.4 v6
E                 ?      ^
E                 + 4.4 v8
E                 ?      ^

join_hook_module = <module 'ucsschool-join-hook' from '/var/build/temp/tmp.BmNl3wQoGF/ucs-school-metapackage-12.0.4/ucsschool-join-hook.py'>
local_errata_version = '3.1.2-999'
log_mock   = <MagicMock name='log' id='3062444396'>
primary_node_app_version = '4.4 v9'
result_version = '4.4 v6'
Comment 5 Daniel Tröder univentionstaff 2021-03-02 13:28:58 CET
Fixed an error in the creation of the OrderedDict.

[4.4] f3f964a97 Bug #52551: initialize OrderedDict with an ordered collection
[4.4] 79e438fbb Bug #52551: improve static typing hints
[4.4] c3116712c Bug #52551: advisory
Comment 6 Ole Schwiegert univentionstaff 2021-03-16 07:22:55 CET
Looks good now!
Comment 7 Tobias Wenzel univentionstaff 2021-03-24 14:11:42 CET
UCS@school 4.4 v9 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v9-de.html

If this error occurs again, please clone this bug.