Bug 52318 - Add HTTP reason phrase to different kind of 503 Service unavailable
Add HTTP reason phrase to different kind of 503 Service unavailable
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-6-errata
Assigned To: Florian Best
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-06 12:48 CET by Florian Best
Modified: 2020-11-25 12:08 CET (History)
2 users (show)

See Also:
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): Troubleshooting
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2020-11-06 12:48:35 CET
We have multiple situation where we respond with 503 Service Unavailable:

* LDAP server down
* UMC-Server down
* UMC-Server connection broke up (crash, restart, etc.)
* UMC-Web-Server down
* SAML misconfiguration

We should add different HTTP reason phrases for this to debug this faster.
Comment 1 Florian Best univentionstaff 2020-11-06 12:53:23 CET
Patch in git:d93366f286ad2d6c27825f6f56e242827c62ec70.
Comment 2 Florian Best univentionstaff 2020-11-09 17:20:35 CET
The common errors now set the HTTP reason phrase.
For the case the UMC-Web-Server is not running, I could not find a solution in Apache httpd to set it.

univention-management-console.yaml
d9def1d931df | YAML Bug #52318

univention-management-console (11.0.5-12)
4c3367f6195a | Bug #52318: add HTTP reason phrase for 503 Service Unavailable errors
Comment 3 Florian Best univentionstaff 2020-11-11 15:13:09 CET
(In reply to Florian Best from comment #2)
> For the case the UMC-Web-Server is not running, I could not find a solution
> in Apache httpd to set it.
A simple WSGI handler is able to set it. So I enabled one, which is also active for unavilable /univention/portal/portal.json and /univention/udm/ service. Prior always the wrong error message for UMC-Webserver is not available was shown.

univention-management-console (11.0.5-14)
1eb0ce960cfb | Bug #52318: add HTTP reason phrase for 502+503 errors if UMC-Web-Server is unreachable
Comment 4 Julia Bremer univentionstaff 2020-11-12 09:35:07 CET
Since the phrase was changed, 60_umc.103_test_umc_server_down.master090 fails on all roles. 

http://jenkins.knut.univention.de:8080/job/UCS-4.4/job/UCS-4.4-6/job/AutotestJoin/lastCompletedBuild/testReport/
Comment 5 Florian Best univentionstaff 2020-11-12 10:46:59 CET
(In reply to Julia Bremer from comment #4)
> Since the phrase was changed, 60_umc.103_test_umc_server_down.master090
> fails on all roles. 
> 
> http://jenkins.knut.univention.de:8080/job/UCS-4.4/job/UCS-4.4-6/job/
> AutotestJoin/lastCompletedBuild/testReport/

Thanks, adjusted the test case to test for the new error message and the reason phrase.

ucs-test (9.0.5-22)
db8d587dc1b7 | Bug #52318: test reason phrase is set
Comment 6 Dirk Wiesenthal univentionstaff 2020-11-18 15:00:03 CET
Script: OK
UMC down: OK
Web server down: OK
Rest API down: ~OK (now sometimes returns JSON where it used to return HTML)
YAML: OK

Seems a much better approach now. The script gives us more freedom to react. Although strictly speaking, UMC now answers problems for UDM Rest. I guess it is overkill, but being able to extend it would have been nice.