Bug 47650 - Add CLI tool to execute diagnostic checks
Add CLI tool to execute diagnostic checks
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-3-errata
Assigned To: Julia Bremer
Erik Damrose
https://trello.com/c/t4S3VwTX/221-bug...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-23 20:15 CEST by Stefan Gohmann
Modified: 2019-02-13 13:27 CET (History)
4 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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2018-08-23 20:15:34 CEST
It would be very helpful for customer debugging situations or for the integration into monitoring solutions to add a simple CLI tool which executes the diagnostic modules.

I think https://github.com/univention/univention-corporate-server/blob/4.3-1/test/ucs-test/tests/00_checks/81_diagnostic_checks.py is a good start.
Comment 2 Julia Bremer univentionstaff 2018-10-10 09:07:23 CEST
Successful build
Package: ucs-test
Version: 8.0.28-202A~4.3.0.201810100853
Branch: ucs_4.3-0
Scope: jbremer
User: jbremer

d39e28e89e Bug #47650: Implemented a CLI Tool which executes the diagnostic modules
e8a6be8e06 Bug #47650: Implemented a CLI Tool which executes the diagnostic modules

Changed ucs-test/tests/00_checks/81_diagnostic_checks.py so that it can be used from the command line
Comment 3 Julia Bremer univentionstaff 2018-10-12 10:00:57 CEST
Successful build
Package: ucs-test
Version: 8.0.28-203A~4.3.0.201810120948
Branch: ucs_4.3-0
Scope: errata4.3-2
User: jbremer

2799fd236e Bug #47650: Added CLI tool that executes diagnostic modules. Added Advisory
f7cdc04ab0 Bug #47650: Edited Advisory
13e1afb324 Bug #47650: Advisory
a258217ce4 Bug #47650: Updated version

Now built in right scope and added Advisory
Comment 4 Julia Bremer univentionstaff 2019-01-10 12:45:41 CET
Successful build
Package: univention-management-console-module-diagnostic
Version: 4.0.1-19A~4.3.0.201901101224
Branch: ucs_4.3-0
Scope: errata4.3-3

46c94c2df0 | Added CLI-Tool which executes the diagnostic-checks
0ac2092261 | Adjust wording
80ba54709b | Version bump
ea4c8c03f2 | Yaml
Comment 5 Jürn Brodersen univentionstaff 2019-01-16 11:19:31 CET
I had a quick lock at this during qa for bug 48477.

I think the following needs to be addressed before the release:

- A traceback is thrown in case the "-t" option isn't given
- A traceback is thrown in case a wrong password / user is given
- A traceback is thrown in case a test fails

Example for the last point:
'''
Traceback (most recent call last):
  File "/usr/bin/univention-run-diagnostic-checks", line 127, in <module>
    main()
  File "/usr/bin/univention-run-diagnostic-checks", line 123, in main
    raise Exception('\n%s' % ('\n'.join(failures)))
Exception: 
############################
## Check failed: 44_well_known_sid_check - Check well known SIDs
fail!!!
########### End #############
'''

Yaml change:
[4.3-3 8b861edbb6] Bug #48477, #47650: yaml
Comment 6 Erik Damrose univentionstaff 2019-02-12 11:05:03 CET
The current state of this bug blocks the release of bug 48427
Comment 7 Julia Bremer univentionstaff 2019-02-12 12:07:47 CET
91a073c0dd Bug #47650: Advisory
4014baf843 Bug #47650: Changelog
c2ca95d5e0 Bug #47650: Fixed uncaught exceptions


Successful build
Package: univention-management-console-module-diagnostic
Version: 4.0.1-22A~4.3.0.201902121144
Branch: ucs_4.3-0
Scope: errata4.3-3
User: jbremer


Merged and built in 4.4-0
Comment 8 Erik Damrose univentionstaff 2019-02-12 13:20:57 CET
Thanks for the quick fix after our discussion earlier!

OK: ucs-test, revert in 82b01fe1dd228c3e4921b446c93d7c22e3545dab
OK: /usr/bin/univention-run-diagnostic-checks
OK: execution of all / some tests
OK: handling of user credentials, asks interactively when not given on cmdline
OK: output of login error message when wrong credentials are given, i think this is okay for such a cmdline tool
OK: yaml
Verified
Comment 9 Erik Damrose univentionstaff 2019-02-13 13:27:24 CET
<http://errata.software-univention.de/ucs/4.3/425.html>