MAAS takes too long to start up that's causing failures to perform operations against the API. This test fails after about 5 minutes on it supposed to be working:
======================================================================
FAIL: maas-integration.TestMAASIntegration.test_set_http_proxy
----------------------------------------------------------------------
testtools.testresult.real._StringException: Empty attachments:
stderr for maas maas ['maas', 'set-config', 'name=http_proxy', 'value=http://162.213.35.104:3128']
retcode for maas maas ['maas', 'set-config', 'name=http_proxy', 'value=http://xxxx:xxx']: {{{2}}}
stdout for maas maas ['maas', 'set-config', 'name=http_proxy', 'value=http://xxxx:xxx']: {{{
<html>
<head><title>503 - MAAS is starting</title></head>
<body>
<h1>MAAS is starting</h1>
<p>Please try again in a few seconds.</p>
</body>
</html>
}}}
Traceback (most recent call last):
File "/tmp/autopkgtest.GMSESi/build.3sF/real-tree/debian/tests/common.py", line 666, in test_set_http_proxy
self.assertThat(output, Contains("OK"))
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 'OK' not in '\n<html>\n <head><title>503 - MAAS is starting</title></head>\n <body>\n <h1>MAAS is starting</h1>\n <p>Please try again in a few seconds.</p>\n </body>\n</html>\n'
It is also possible that a worker crashed, so the master started another worker. The worker was not ready for your request.
Either way we need to look into this. We should potentially not even open the socket on the worker until its ready to handle requests.