Bug 35865

Summary: Connector rejected check
Product: UCS Reporter: Stefan Gohmann <gohmann>
Component: UMC - System diagnosticAssignee: Lukas Oyen <oyen>
Status: CLOSED FIXED QA Contact: Arvid Requate <requate>
Severity: enhancement    
Priority: P5 CC: best, oyen, requate
Version: UCS 4.0Flags: oyen: Patch_Available+
Target Milestone: UCS 4.2-2-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- 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: 35865-diagnostic-s4rejects-420.tar
35865-diagnostic-s4rejects.png
8859: 35865-diagnostic-s4rejects-420.tar

Description Stefan Gohmann univentionstaff 2014-09-10 08:33:36 CEST
We should add a system diagnostic plugin which checks the connector rejects. If rejected objects are available, the module should link to an SDB article which describes how to deal with these objects.
Comment 1 Lukas Oyen univentionstaff 2017-05-17 18:24:34 CEST
Created attachment 8859 [details]
35865-diagnostic-s4rejects-420.tar

The attached patches implement the S4 Connector rejected checked similar to `univention-s4connector-list-rejected`. It does not use this tool directly to avoid string parsing.

If the S4 Connector is not an active service, this simply skips the checks. It might be better to implement a module-level callback `is_disabled()` or something, that lets the `Instance` class filter the active checks.

- If the service is running, but `univention.s4connector.s4` fails to import, a CRITICAL error is raised.
- If any of the necessary UCR variables to instantiate the `s4()` class are not set, a CRITICAL error is raised.
- If any rejects are found a WARNING is raised.
Comment 2 Lukas Oyen univentionstaff 2017-05-17 18:25:04 CEST
Created attachment 8860 [details]
35865-diagnostic-s4rejects.png

Example reject report.
Comment 3 Florian Best univentionstaff 2017-05-18 15:17:59 CEST
1. load_mapping() should use try-finally.
2. an empty '%(configbase)s/s4/ldap/bindpw' file will cause an exception. Better:
s4_ldap_bindpw = fob.read().rstrip()
3. leading white space in visible string: 'label': _(' Univention Support Database
Comment 4 Lukas Oyen univentionstaff 2017-05-18 15:31:48 CEST
Created attachment 8864 [details]
8859: 35865-diagnostic-s4rejects-420.tar

Updated patches.
Comment 5 Lukas Oyen univentionstaff 2017-08-01 16:26:28 CEST
Committed in r81607 - r81608 (advisory r81649).
Comment 6 Arvid Requate univentionstaff 2017-08-24 21:36:25 CEST
Ok, works.
Comment 7 Erik Damrose univentionstaff 2017-09-20 15:03:37 CEST
<http://errata.software-univention.de/ucs/4.2/166.html>