Bug 47649 - More information about failed diagnostic checks
More information about failed diagnostic checks
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - System diagnostic
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-2-errata
Assigned To: Julia Bremer
Arvid Requate
https://trello.com/c/x1L2HA8n/220-bug...
:
Depends on:
Blocks: 48477
  Show dependency treegraph
 
Reported: 2018-08-23 20:11 CEST by Stefan Gohmann
Modified: 2019-01-16 09:58 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):
Max CVSS v3 score:


Attachments
management-console-module-diagnostic.log (37.36 KB, text/x-log)
2018-11-21 22:10 CET, Arvid Requate
Details
bug47649_qa.diff (17.60 KB, patch)
2018-11-21 22:11 CET, Arvid Requate
Details | Diff

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:11:03 CEST
If we receive diagnostic errors from customer systems, it is hard to understand which commands have been executed.

For example if you change the /etc/machine.secret and re-run the checks you get for the failed ssh connection only the following message in UMC:
 {'desc': 'Invalid credentials'}

The logfile shows only:
14.03.18 18:51:16.005  MODULE      ( PROCESS ) : Running <univention.management.console.modules.diagnostic.Plugin object at 0x7fbac916f150>

It would be helpful if the errors are written to the logfile. It would also be extremely good if the commands are written to the logfile, for example:
 Try univention-ssh /etc/machine.secret backup$@master.domain
Comment 2 Julia Bremer univentionstaff 2018-10-08 13:13:46 CEST
Fixed in 4.3-2, built in errata4.3-2

d3d356c7bc Bug #47649: Advisory
febcc29e0c Bug #47649: Merge branch 'jbremer/bug47649' into 4.3-2
bbb4417e9e Bug #47649: Fixed tab whitespace mix
bf9ab4b9df Bug #47649: Fixed german translation
5c6d0494c9 Bug #47649: Improved logging of diagnostic plugin actions
25d00e08aa Bug #47649: Added logging messages to the diagnostic modules
Comment 3 Arvid Requate univentionstaff 2018-10-08 17:12:13 CEST
Today on Ticket #2018100521000659 we saw a bogous error message from

univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/22_kdc_service.py

which says "samba/interfaces does not contain lo, 127.0.0.1 or 0.0.0.0." just because the KDC is not reachable. I think the code needs to check the variable "local_included" and only print that message if that variable is False.
Comment 4 Julia Bremer univentionstaff 2018-10-09 10:31:02 CEST
Fixed in 4.3-2, built in errata4.3-2
Added fix for the faulty error message from Ticket 2018100521000659.
Comment 5 Julia Bremer univentionstaff 2018-10-09 11:39:36 CEST
51baa41863 Bug #47649: Updated version number
523aaf3135 Bug #47649: Fixed faulty error message in 22_kdc_service
cb40a42c78 Bug #47649: Fixed faulty error message in 22_kdc_service

Version: 4.0.1-4A~4.3.0.201810090932
Branch: ucs_4.3-0
Scope: errata4.3-2
Comment 6 Julia Bremer univentionstaff 2018-10-18 11:07:01 CEST
Successful build
Package: univention-management-console-module-diagnostic
Version: 4.0.1-8A~4.3.0.201810171807
Branch: ucs_4.3-0
Scope: errata4.3-2
User: jbremer

fc4087879e Bug #47649: Updated version
c39ac0c74b Bug #47649: Updated version
97eb90113a Bug #47649: Code Cleanup - Version bump
ce78ee5ce0 Bug #47649: Code cleanup

Cleaned up the code
Comment 7 Arvid Requate univentionstaff 2018-11-21 22:10:45 CET
Created attachment 9750 [details]
management-console-module-diagnostic.log

The attached log file shows some remaining issues:

* 31_file_permissions is a bit chatty, maybe we can merge both lines into one? Like: "Checking permissions: stat /etc/ldap.secret". Actually, if we do two lines then the support would probably love to see the expectation logged, something like:
     "expecting: 0o640 for 'root'.'DC Backup Hosts', must exist."

* Please log the "Similar to running" lines in a way that is properly quoted
  for cut&paste execution. E.g. 04_saml_certificate_check logs:

  Trying to find nameserver <univention.management.console.modules.diagnostic.plugins.20_check_nameservers.NameServer object at 0x7fbe45ccc7d0> in UDM/LDAP
  Similar to running: univention-ldapsearch (|(&(relativeDomainName=master10)(zoneName=ar41i1.qa)))

  but when I cut&past that, my bash complains.. So I'd rather log this:

  Trying to find nameserver master10 in UDM/LDAP
  Similar to running: univention-ldapsearch '(|(&(relativeDomainName=master10)(zoneName=ar41i1.qa)))'

* The ordering of messages in 11_nameserver.py is reversed:

  Similar to running: dig +short www.univention.de @192.168.0.3
  Trying 192.168.0.3 to resolve www.univention.de

* The printed "Similar two" commands need to work generally.
  In the case of 11_nameserver.py it says:

  Similar to running: dig +short master10 @10.200.8.10

  But that doesn't work. You need to add the domain part here, like:
  
  dig +short master10.ar41i1.qa @10.200.8.10

* There seems to be a general issue of the ordering of log messages.
  In my VM i see the output of 22_kdc_service and 11_nameserver mixed together,
  to me this looks as if the individual test cases are run in parallel maybe?
  We should check that. This way the log messages are pretty confusing.
  If this is true then I guess we need to serialize the execution.

I'll attach a git diff clarifying some of the points mentioned above.
Comment 8 Arvid Requate univentionstaff 2018-11-21 22:11:15 CET
Created attachment 9751 [details]
bug47649_qa.diff
Comment 9 Julia Bremer univentionstaff 2018-11-23 15:21:33 CET
Successful build
Package: univention-management-console-module-diagnostic
Version: 4.0.1-13A~4.3.0.201811231513
Branch: ucs_4.3-0
Scope: errata4.3-2
User: jbremer

I hope I finally 
caught all the inconsistencies in the logging.
Comment 10 Julia Bremer univentionstaff 2018-11-29 11:05:12 CET
Successful build
Package: univention-management-console-module-diagnostic
Version: 4.0.1-14A~4.3.0.201811291050
Branch: ucs_4.3-0
Scope: errata4.3-2
User: jbremer

f75d641280 Bug #47649: Merge branch 'jbremer/bug47649' into 4.3-2
68f4eea2bc Bug #47649: Yaml
dc71b5f8b0 Bug #47649: Changelog
2067a42a07 Bug #47649: Fixed inconsistencies in logging, and diagnostic checks I are now executed in order

I cleaned up the logging messages and the diagnostic checks are now executed in the correct order.
Comment 11 Julia Bremer univentionstaff 2018-11-29 15:18:23 CET
Successful build
Package: univention-management-console-module-diagnostic
Version: 4.0.1-15A~4.3.0.201811291513
Branch: ucs_4.3-0
Scope: errata4.3-2
User: jbremer

b4236634f7 Bug #47649: Translation and changelog
402071d744 Bug #47649: Cleanup and improved wording

Made minor improvements
Comment 12 Arvid Requate univentionstaff 2018-11-29 16:46:26 CET
Ok, looks good. I think the changes done via this Bug improve the readability of the log messages quite a bit. I hope support and customers are more happy with this.


I'm still seeing interspersed log messages on my VM, but I guess that's due to a comination of:

1) the parallel javascript promise map in umc/js/diagnostic.js:
   this.standbyDuring(all(array.map(plugins, lang.hitch(this, function(plugin)

2) the notifier.threads from python-notifier used in
   univention.management.console.modules.decorators.simple_response

Anyway, that's not the scope of this bug, so we'll leave that as is.

Advisory: Ok
Comment 13 Arvid Requate univentionstaff 2018-12-05 14:39:14 CET
<http://errata.software-univention.de/ucs/4.3/352.html>