Change default fabric

Created a maas controller on lxd container. Initially this container had access to two network interfaces, one connected to an internal network and the other connected to a pxe network.

At some point this changed and I deleted the internal network and only had maas connected to the pxe network. The issue is that maas still contains a fabric related to this network interface which no longer exists. When I try to delete it, I get the message “This fabric cannot be deleted because it is the default fabric for this MAAS.”.

How can I change this behaviour? Is it possible to change the default fabric?

Hi @victoitor

Fabric information is stored in the database table maasserver_fabric
And the logic to identify if the Fabric is a default one simply does this check:

def is_default(self):
    """Is this the default fabric?"""
    return self.id == 0

I believe you can modify database values (change the ID of the Fabric) and then it should let you remove the one that doesn’t exist anymore.