Bug 43975

Summary: Handle SERVER_DOWN: {'desc': "Can't contact LDAP server"} exception in CLI Server
Product: UCS Reporter: Stefan Gohmann <gohmann>
Component: UDM - CLIAssignee: Johannes Keiser <keiser>
Status: CLOSED FIXED QA Contact: Florian Best <best>
Severity: normal    
Priority: P5 CC: best
Version: UCS 4.1Flags: best: Patch_Available+
Target Milestone: UCS 4.2-1-errata   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=39795
What kind of report is it?: Development Internal 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: patch

Description Stefan Gohmann univentionstaff 2017-03-20 07:45:08 CET
Currently, the UDM CLI fails with an exception if the LDAP server is not available. Since, it might be a normal case at least during upgrades, UDM CLI should write a normal error message instead of a traceback.
Comment 1 Florian Best univentionstaff 2017-03-20 12:58:12 CET
Created attachment 8585 [details]
patch
Comment 2 Johannes Keiser univentionstaff 2017-06-29 17:19:23 CEST
(In reply to Florian Best from comment #1)
> Created attachment 8585 [details]
> patch

Applied patch:

r 80647
univention-directory-manager-modules (12.0.17-31) 
* Bug #43975: Applied patch from Florian Best - UDM CLI now writes error
message instead of failing with an exception if the LDAP server is not
available

YAML: r 80649
Comment 3 Johannes Keiser univentionstaff 2017-06-29 18:21:07 CEST
Applied additional patch:

r 80654
univention-directory-manager-modules (12.0.17-34) 
* Bug #43975: Applied additional patch - Improved wording of error message
Comment 4 Florian Best univentionstaff 2017-06-29 18:36:02 CEST
OK: the following error message is shown
# service slapd stop
# udm users/user create
E: The LDAP Server is currently not available.
# echo $?
3

OK: YAML
Comment 5 Janek Walkenhorst univentionstaff 2017-07-05 13:06:37 CEST
<http://errata.software-univention.de/ucs/4.2/79.html>