I updated our maas staging environment to 2.9.2 with snap (moved DB off host to it’s own DB server, rebuilt region and reack controllers as 20.04 and re-paired. Using my home grown tool which leverages python-libmaas to talk to maas and do its thing. Updated python-libmaas to the current tag (0.6.6) Commissioning works great, however deployment does not My code calls machine.restore_networking_configuration() which previously worked against maas 2.6.2 but now fails against 2.9.2 I tried using machine.restore_default_configuration() instead and it results in pretty much the same stack trace.
File "./maasterblaster.py", line 720, in cleanup_machine
machine.restore_default_configuration()
File "/home/dandruczyk/libmaas/lib/python3.8/site-packages/maas/client/utils/maas_async.py", line 43, in wrapper
result = eventloop.run_until_complete(result)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/dandruczyk/libmaas/lib/python3.8/site-packages/maas/client/viscera/machines.py", line 788, in restore_default_configuration
await self._handler.restore_default_configuration(system_id=self.system_id)
File "/home/dandruczyk/libmaas/lib/python3.8/site-packages/maas/client/bones/__init__.py", line 307, in __call__
response = await self.bind(**params).call(**data)
File "/home/dandruczyk/libmaas/lib/python3.8/site-packages/maas/client/bones/__init__.py", line 459, in dispatch
response = await session.request(
File "/home/dandruczyk/libmaas/lib/python3.8/site-packages/aiohttp/client.py", line 504, in _request
await resp.start(conn)
File "/home/dandruczyk/libmaas/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 847, in start
message, payload = await self._protocol.read() # type: ignore # noqa
File "/home/dandruczyk/libmaas/lib/python3.8/site-packages/aiohttp/streams.py", line 591, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError
This is blocking our production upgrade which is sorely needed because maas 2.6.2 does NOT work well with 1000+ machines in it’s DB. Help!
Sorry you’re hitting this issue - we’ve tried a couple of times to reproduce it but are having no luck.
I wonder if you could help us understand a bit more about your setup so that we can dig in - is maasterblaster.py (love the name!) running on a machine with direct access to the MAAS server ( TCP :5240) or is there a proxy/load-balancer/ something else in between?
This is running with direct access to the mass server. I.e. http://:5240/MAAS. No LB yet, though that is planned to increase the resiliency once we vet 2.9.x for use.
The bug I filed on the MaaS bug tracker detailed both the server and client stack traces.
I bet the maas snap was never rebuilt when the above bug was fixed… Can someone please do that?
Either way this is a showstopper and no-one has or yet triaged my bug posted in a previous comment so I’m stuck as are likely others who use the API in an advanced manner.
With both of these workarounds in place, we have been able to successfully rebuild 2.9.2 with no consequential change and have published that to the snap store in the 2.9/candidate channel.
I installed the 2.9.2 snap from the canidate channel on my test environment region and rack controllers an was able to use the API now with my custom code (maasterblaster) successfully.