Machines can't be deployed after deselecting all archs in the "Ubuntu extra architectures" package repo

Bug #1894116 reported by Victor Tapia on 2020-09-03
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Deselecting all archs in the "Ubuntu extra architectures"/ubuntu-ports package repo blocks new deployments from happening with the following error:

"Error:Failed to retrieve curtin config: 'NoneType' object has no attribute 'url'"

When deselecting all archs and saving, the default archs are pulled in again (["amd64", "i386"]), which are filtered out by PackageRepository.get_ports_archive() because it looks for PORTS_ARCHES (["armhf", "arm64", "ppc64el", "s390x"]), triggering the error above.

The message doesn't give any information about the origin of the error. Given that this is a default repo, changing the archs pulled in when left empty or raising a warning when saving the changes seem to be good options for this bug.

Traceback from logs:

2020-11-25 16:29:01 maasserver.websockets.protocol: [critical] Error on request (49) machine.action: Failed to retrieve curtin config: 'NoneType' object has no attribute 'url'
        Traceback (most recent call last):
          File "/usr/lib/python3.8/", line 870, in run
            self._target(*self._args, **self._kwargs)
          File "/snap/maas/10643/lib/python3.8/site-packages/provisioningserver/utils/", line 825, in worker
            return target()
          File "/snap/maas/10643/usr/lib/python3/dist-packages/twisted/_threads/", line 46, in work
          File "/snap/maas/10643/usr/lib/python3/dist-packages/twisted/_threads/", line 190, in doWork
        --- <exception caught here> ---
          File "/snap/maas/10643/usr/lib/python3/dist-packages/twisted/python/", line 250, in inContext
            result = inContext.theWork()
          File "/snap/maas/10643/usr/lib/python3/dist-packages/twisted/python/", line 266, in <lambda>
            inContext.theWork = lambda:, func, *args, **kw)
          File "/snap/maas/10643/usr/lib/python3/dist-packages/twisted/python/", line 122, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/snap/maas/10643/usr/lib/python3/dist-packages/twisted/python/", line 85, in callWithContext
            return func(*args,**kw)
          File "/snap/maas/10643/lib/python3.8/site-packages/provisioningserver/utils/", line 860, in callInContext
            return func(*args, **kwargs)
          File "/snap/maas/10643/lib/python3.8/site-packages/provisioningserver/utils/", line 192, in wrapper
            result = func(*args, **kwargs)
          File "/snap/maas/10643/lib/python3.8/site-packages/maasserver/utils/", line 737, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/snap/maas/10643/lib/python3.8/site-packages/maasserver/utils/", line 540, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.8/", line 75, in inner
            return func(*args, **kwds)
          File "/snap/maas/10643/lib/python3.8/site-packages/maasserver/websockets/", line 402, in prep_user_execute
            return self._call_method_track_queries(
          File "/snap/maas/10643/lib/python3.8/site-packages/maasserver/websockets/", line 426, in _call_method_track_queries
            result = method(params)
          File "/snap/maas/10643/lib/python3.8/site-packages/maasserver/websockets/handlers/", line 945, in action
            return action.execute(**extra_params)
          File "/snap/maas/10643/lib/python3.8/site-packages/maasserver/", line 171, in execute
            self._execute(*args, **kwargs)
          File "/snap/maas/10643/lib/python3.8/site-packages/maasserver/", line 540, in _execute
            raise NodeActionError("Failed to retrieve curtin config: %s" % e)
        maasserver.exceptions.NodeActionError: Failed to retrieve curtin config: 'NoneType' object has no attribute 'url'

Victor Tapia (vtapia) wrote :

Adding maas-ui because this could be fixed by setting a different set of default values or just showing an error message when left empty.

Lee Trager (ltrager) wrote :

A user can also remove repositories with the API. We should check if this bug is reproducible on the API. If so this should probably be fixed on the backend.

Bill Wear (billwear) wrote :

I can confirm that this behavior indeed occurs under the conditions given. Triaging this bug.

Changed in maas:
status: New → Triaged
Bill Wear (billwear) wrote :

Oops, noticed UI tag. Putting status back to new.

Changed in maas:
status: Triaged → New
Bill Wear (billwear) wrote :

From the CLI, I do not seem to be able to: (1) delete the repository (refused), disable the repository (refused), or change the list of architectures such that they are all blank ("not a valid architecture"). Someone else may know how to do this, but I can't seem to reproduce this with the CLI due to built-in protections.

Victor Tapia (vtapia) wrote :

This patch changes the default arches for PORTS_ARCHES to "armhf", "arm64", "powerpc" and "ppc64el"

tags: added: ui
no longer affects: maas
affects: maas-ui → maas
description: updated
Changed in maas-ui:
importance: Undecided → Unknown
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.