Bug 43861 - Test case 60_umc/10_services_list fails in UCS 4.2
Test case 60_umc/10_services_list fails in UCS 4.2
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: UMC
unspecified
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Florian Best
Stefan Gohmann
: interim-4
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-15 06:19 CET by Stefan Gohmann
Modified: 2017-04-04 18:29 CEST (History)
1 user (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):
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 2017-03-15 06:19:12 CET
Please fix the test or fix the product or in case it is not so important disable the test case.

http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/75/SambaVersion=s3,Systemrolle=master/testReport/


*** BEGIN *** ['/usr/bin/python', '10_services_list'] ***
*** 60_umc/10_services_list *** Test the output of the UMC service module ***
*** START TIME: 2017-03-14 15:59:35 ***

*** UMC request: "POST auth" (None)
UMC request payload: 
{'options': {'password': 'univention', 'username': 'Administrator'}}
*** UMC response: 
{u'message': None,
 u'options': None,
 u'result': {u'username': u'Administrator'},
 u'status': 200}
***


*** UMC request: "POST command/services/query" (None)
UMC request payload: 
{'options': {}}
UMC request failed: 502 on master090.autotest090.local (command/services/query): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/univention/command/services/query">POST&nbsp;/univention/command/services/query</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.4.10 (Univention) Server at master090.autotest090.local Port 443</address>
</body></html>


Traceback (most recent call last):
  File "10_services_list", line 58, in <module>
    sys.exit(TestUMC.main())
  File "10_services_list", line 51, in main
    request_result = self.query()
  File "./umc.py", line 125, in query
    return self.request('services/query')
  File "./umc.py", line 30, in request
    return self.client.umc_command(*args, **kwargs).result
  File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 58, in umc_command
    return super(Client, self).umc_command(*args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 272, in umc_command
    return self.request('POST', 'command/%s' % (path,), data, headers)
  File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 69, in request
    response = super(Client, self).request(method, path, data, headers)
  File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 297, in request
    return self.send(request)
  File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 316, in send
    raise HTTPError(request, response, self.hostname)
univention.lib.umc.BadGateway: 502 on master090.autotest090.local (command/services/query): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/univention/command/services/query">POST&nbsp;/univention/command/services/query</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
<hr>
<address>Apache/2.4.10 (Univention) Server at master090.autotest090.local Port 443</address>
</body></html>

*** END TIME: 2017-03-14 15:59:41 ***
*** TEST DURATION (H:MM:SS.ms): 0:00:06.136055 ***
*** END *** 1 ***
Comment 1 Florian Best univentionstaff 2017-03-15 17:24:09 CET
This test case only fails because the previous creates a lot of connections to UMC → Bug #43860.
Comment 2 Florian Best univentionstaff 2017-03-15 17:24:22 CET

*** This bug has been marked as a duplicate of bug 43860 ***
Comment 3 Stefan Gohmann univentionstaff 2017-03-18 21:09:45 CET
The test case still fails:

[2017-03-18 09:29:32.195510] 
[2017-03-18 09:29:32.195645] *** UMC request: "POST auth" (None)
[2017-03-18 09:29:32.195885] UMC request payload: 
[2017-03-18 09:29:32.195942] {'options': {'password': 'univention', 'username': 'Administrator'}}
[2017-03-18 09:29:32.197138] UMC request failed: ('Could not send request.', error(111, 'Connection refused'))
[2017-03-18 09:29:32.197189] 
[2017-03-18 09:29:32.197285] An error while trying to authenticate to UMC: ConnectionError('Could not send request.', error(111, 'Connection refused'))
[2017-03-18 09:29:32.197361] Waiting 5 seconds and making another attempt
[2017-03-18 09:29:37.206381] 
[2017-03-18 09:29:37.206491] *** UMC request: "POST auth" (None)
[2017-03-18 09:29:37.206714] UMC request payload: 
[2017-03-18 09:29:37.206766] {'options': {'password': 'univention', 'username': 'Administrator'}}
[2017-03-18 09:29:37.207602] UMC request failed: ('Could not send request.', error(111, 'Connection refused'))
[2017-03-18 09:29:37.207652] 
(2017-03-18 09:29:37.207769) Traceback (most recent call last):
(2017-03-18 09:29:37.207823)   File "10_services_list", line 58, in <module>
(2017-03-18 09:29:37.207915)     sys.exit(TestUMC.main())
(2017-03-18 09:29:37.207979)   File "10_services_list", line 50, in main
(2017-03-18 09:29:37.208067)     self.create_connection_authenticate()
(2017-03-18 09:29:37.208124)   File "./umc.py", line 40, in create_connection_authenticate
(2017-03-18 09:29:37.208209)     self.client = Client.get_test_connection()
(2017-03-18 09:29:37.208267)   File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 52, in get_test_connection
(2017-03-18 09:29:37.225631)     return cls(hostname, username, password, *args, **kwargs)
(2017-03-18 09:29:37.225662)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 242, in __init__
(2017-03-18 09:29:37.268599)     self.authenticate(username, password)
(2017-03-18 09:29:37.268634)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 250, in authenticate
(2017-03-18 09:29:37.268654)     return self.umc_auth(username, password)
(2017-03-18 09:29:37.268666)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 286, in umc_auth
(2017-03-18 09:29:37.268676)     return self.request('POST', 'auth', data)
(2017-03-18 09:29:37.268687)   File "/usr/lib/pymodules/python2.7/univention/testing/umc.py", line 69, in request
(2017-03-18 09:29:37.268697)     response = super(Client, self).request(method, path, data, headers)
(2017-03-18 09:29:37.268707)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 297, in request
(2017-03-18 09:29:37.268716)     return self.send(request)
(2017-03-18 09:29:37.268727)   File "/usr/lib/pymodules/python2.7/univention/lib/umc.py", line 312, in send
(2017-03-18 09:29:37.268737)     raise ConnectionError('Could not send request.', reason=exc)
(2017-03-18 09:29:37.268747) univention.lib.umc.ConnectionError: ('Could not send request.', error(111, 'Connection refused'))

http://jenkins.knut.univention.de:8080/job/UCS-4.2/job/UCS-4.2-0/job/AutotestJoin/80/SambaVersion=s3,Systemrolle=master/testReport/60_umc/10_services_list/test/
Comment 4 Florian Best univentionstaff 2017-03-20 18:07:08 CET
subprocess.Popen() has been replaced with subprocess.call() which blocks until the commands are executed, otherwise the test script ends immediately and kills the not-yet-started subproceces.

ucs-test (7.0.20-15):
r78008 | Bug #43861: restart web components in any case
Comment 5 Stefan Gohmann univentionstaff 2017-03-21 07:14:34 CET
OK, looks good now.
Comment 6 Stefan Gohmann univentionstaff 2017-04-04 18:29:45 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".