Univention Bugzilla – Bug 52195
system diagnose module to check installation of ox-support package in ucsschool
Last modified: 2021-03-25 08:12:48 CET
Create a system diagnose module that is shipped with ucsschool that should check and fail on the following conditions: 1. running on DC master 2. OX ist installed somewhere in the domain (test for existence of "isOxUser" users/user UDM property) 3. the package "ucs-school-ox-support" is not installed The "fix" button should install the package.
Added diagnostic module with commit 1fe859311 Bug #52195: added diagnostic module for checking ox support on branch troehmey/bug52195_diagnostic_ox_support. I tested the module by removing the package ucs-school-ox-support and then running the diagnostic module. Hitting the fix-button resolved the issue and the package status was then "install ok installed".
Added small fixup with commit f92ddaaed
* remove unused imports ucr_get, ucr_is_true * max line length is 105 chars * "\n".join([_("")]) can be reduced to _("") * The "description" is wrong: - The app is called "OX App Suite", most users don't know the app id "oxseforucs". - The app does not need to be installed on the dc master, it is enough that it is installed somewhere in the domain. * where do the KeyErrors come from? I cannot reproduce them. * Please add to the warning that OX is installed in the domain, but the package not etc.
The copyright notice starts with 2019, but the script is from this year.
Fixed issues mentioned in comment #3 and comment #4 with commit [troehmey/bug52195_diagnostic_ox_support] Bug #52195: fixed descriptions, removed unnecessary import
* Please make the module level description a module docstring. * Unused import: "ucr". * Unreachable "return" after a "raise". * If a string is inside brackets and should be split, it is safer to make two strings out of it, that to use "\": -------------------------------------------------- >>> print( ... "foo " ... "bar" ... ) foo bar -------------------------------------------------- * The comment "app is not installed on DC master" is misleading. The if branch is taken if the app is not installed _anywhere_.
Fixed issues mentioned in comment #6 with commit da3cd30a2 Bug #52195: check if installed on dc-master (sorry for the bad commit message...) I would like to squash all commits when QA gives green light. Until now the test was also missing the check if the test is running on DC Master
OK: code review OK: functionality (manual test: detection and installation of missing package) Please squash, merge to 4.4, build, advisory.
Feature branch merged to 4.4 with: 8b7b1cb71 Bug #52195: added yaml de78b963d Bug #52195: added changelog entry dfb8db599 Bug #52195: Merge branch 'troehmey/bug52195_diagnostic_ox_support' into 4.4 Successful build: Package: ucs-school-umc-diagnostic Version: 1.0.0-14A~4.4.0.202012011637 Branch: ucs_4.4-0 Scope: ucs-school-4.4
OK: merge OK: build OK: advisory
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.