Maas deploy wuth custom preseeds broken?

Today we received libpython3.8 update for Ubuntu 20.04 and after that MaaS become broken with error: Error:Failed to retrieve curtin config: init() missing 2 required positional arguments: ‘doc’ and ‘pos’

Default preseed works, but our preseed with storage section fails. We’ve been using MaaS 2.9 so I’ve tried to upgrade to 3.0 and same thing happens. Did anyone else got this errors?
I think this is something to do with tempita templates, as error occured when MaaS tries to parse template with template.substitute. I don’t want to file Bug yet as I’m not sure that this is not something on preseed side, although it worked fine and wasn’t changed and only became broken this morning. Also full error in regiond.log:

021-07-02 13:33:32 maasserver.websockets.protocol: [critical] Error on request (1773) machine.action: Failed to retrieve curtin config: init() missing 2 required positional arguments: ‘doc’ and ‘pos’
Traceback (most recent call last):
File “/usr/lib/python3.8/”, line 870, in run
self._target(*self._args, **self._kwargs)
File “/usr/lib/python3/dist-packages/provisioningserver/utils/”, line 835, in worker
return target()
File “/usr/lib/python3/dist-packages/twisted/_threads/”, line 46, in work
File “/usr/lib/python3/dist-packages/twisted/_threads/”, line 190, in doWork
— —
File “/usr/lib/python3/dist-packages/twisted/python/”, line 250, in inContext
result = inContext.theWork()
File “/usr/lib/python3/dist-packages/twisted/python/”, line 266, in
inContext.theWork = lambda:, func, *args, **kw)
File “/usr/lib/python3/dist-packages/twisted/python/”, line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File “/usr/lib/python3/dist-packages/twisted/python/”, line 85, in callWithContext
return func(*args,**kw)
File “/usr/lib/python3/dist-packages/provisioningserver/utils/”, line 870, in callInContext
return func(*args, **kwargs)
File “/usr/lib/python3/dist-packages/provisioningserver/utils/”, line 202, in wrapper
result = func(*args, **kwargs)
File “/usr/lib/python3/dist-packages/maasserver/utils/”, line 751, in call_within_transaction
return func_outside_txn(*args, **kwargs)
File “/usr/lib/python3/dist-packages/maasserver/utils/”, line 554, in retrier
return func(*args, **kwargs)
File “/usr/lib/python3.8/”, line 75, in inner
return func(*args, **kwds)
File “/usr/lib/python3/dist-packages/maasserver/websockets/”, line 402, in prep_user_execute
return self._call_method_track_queries(
File “/usr/lib/python3/dist-packages/maasserver/websockets/”, line 426, in _call_method_track_queries
result = method(params)
File “/usr/lib/python3/dist-packages/maasserver/websockets/handlers/”, line 947, in action
return action.execute(**extra_params)
File “/usr/lib/python3/dist-packages/maasserver/”, line 171, in execute
self._execute(*args, **kwargs)
File “/usr/lib/python3/dist-packages/maasserver/”, line 541, in _execute
raise NodeActionError(“Failed to retrieve curtin config: %s” % e)
maasserver.exceptions.NodeActionError: Failed to retrieve curtin config: init() missing 2 required positional arguments: ‘doc’ and ‘pos’

Could you please include MAAS and curtin packages versions?

ii maas 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all “Metal as a Service” is a physical cloud and IPAM
ii maas-cli 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all MAAS client and command-line interface
ii maas-common 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all MAAS server common files
ii maas-dhcp 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all MAAS DHCP server
ii maas-enlist 0.4+bzr38-0ubuntu4 amd64 MAAS enlistment tool
ii maas-proxy 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all MAAS Caching Proxy
ii maas-rack-controller 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all Rack Controller for MAAS
ii maas-region-api 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all Region controller API service for MAAS
ii maas-region-controller 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all Region Controller for MAAS
ii python3-django-maas 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all MAAS server Django web framework (Python 3)
ii python3-maas-client 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all MAAS python API client (Python 3)
ii python3-maas-provisioningserver 1:3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1 all MAAS server provisioning libraries (Python 3)

ii curtin-common 21.2-0ubuntu1~20.04.1 all Library and tools for curtin installer
ii python3-curtin 21.2-0ubuntu1~20.04.1 all Library and tools for curtin installer

Now I found culprit, I’ve deleted previous comment as I was editing wrong preseed file for testing, but now I found where’s that error comes from:

puppet_team = team_req.json().get(‘team’)

This is what generated this error, something in update doesn’t like this python code injection.

We can close this discussion. Sorry it was not python bug, it was human factor bug, one engineer did wrong thing and we didn’t detect it in time.

1 Like

@artscout, it happens to the best of us! no problems. feel free to come back and chat if that didn’t solve the issue, or if you have other problems.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.