python-libmaas 0.6.6
maas 2.9.2-9164-g.ac176b5c4 11851 2.9/stable canonical✓ -
Attempting to use machine.restore_default_configuration() or
machine.restore_networking_configuration() (and likely machine.restore_storage_configuration() though that one was untested) all fail. These were against recently commissioned machines. This makes it impossible to use our automation of the maas API for provisioning. This worked previously on maas 2.6.2 (from ppa), This is preventing our upgrade to maas 2.9.x in production
From the client side:
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
From the MAAS server side:
2021-03-06 23:11:56 regiond: [info] 10.72.68.30 GET /MAAS/api/2.0/machines/fngwcr/ HTTP/1.1 --> 200 OK (referrer: -; agent: Python/3.8 aiohttp/3.6.2)
2021-03-06 23:11:56 twisted.internet.asyncioreactor.AsyncioSelectorReactor: [critical]
Traceback (most recent call last):
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/internet/asyncioreactor.py", line 136, in _readOrWrite
why = method()
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 243, in doRead
return self._dataReceived(data)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/internet/tcp.py", line 249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 2952, in dataReceived
return self._channel.dataReceived(data)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 2245, in dataReceived
return basic.LineReceiver.dataReceived(self, data)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/protocols/basic.py", line 579, in dataReceived
why = self.rawDataReceived(data)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 2252, in rawDataReceived
self._transferDecoder.dataReceived(data)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 1699, in dataReceived
finishCallback(data[contentLength:])
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 2115, in _finishRequestBody
self.allContentReceived()
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 2224, in allContentReceived
req.requestReceived(command, path, version)
File "/snap/maas/11851/lib/python3.8/site-packages/maasserver/webapp.py", line 54, in requestReceived
return super().requestReceived(command, path, version)
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 898, in requestReceived
self.args.update({
File "/snap/maas/11851/usr/lib/python3/dist-packages/twisted/web/http.py", line 899, in <dictcomp>
x.encode('iso-8859-1'): \
builtins.AttributeError: 'NoneType' object has no attribute 'encode'
This seems to be a possible bug in python-twisted /twistedmatrix. com/trac/ ticket/ 10084 /github. com/twisted/ twisted/ pull/1512
https:/
allegedly fixed in
https:/