How to modify the networking setup of a deployed node in MASS

Case: you need to add a subnet/space in a deployed node in MAAS, and make Juju aware of it in order to deploy services on LXD containers (which require spaces).

Instructions

  1. Log in to the MAAS node

  2. Log in to the database (in our case MAAS is in HA managed by Stolon):

    # psql -U stolonuser -h localhost -p 25432 -d maasdb
    

N.B:

-  \l: show databases;
- \dt: show tables;
- \d: describe table
- select example: select hostname, status from maasserver_node where status=...;

The nodes are recorded in the table maasserver_node.

  1. Update node, set status=4 (ready)

The node becomes ready and we can modify its configuration from the GUI!

  1. Update node, set status=6 (deployed)

N.B. The administrator need to apply the actual configuration of the node: netplan configuration, netplan apply, possibly reboot of the existing LXD containers to make them aware of the changes…