diff --git a/web/support/kb/maas/modify_networking_deployed_node.rst b/web/support/kb/maas/modify_networking_deployed_node.rst index a5e48f79d4dd26a36062325a21244006d41516a3..4e92cd546a2a222647eba9ed542e2f73dab7c240 100644 --- a/web/support/kb/maas/modify_networking_deployed_node.rst +++ b/web/support/kb/maas/modify_networking_deployed_node.rst @@ -1,7 +1,8 @@ -How to modify the networking setup of a deployed node in MASS +How to modify the networking setup of a deployed node in MAAS ============================================================= -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). +Case1: 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). +CASE2: you need to modify the MAC addresses of the network interfaces of a deployed node following a replacement of the network board Instructions ------------ @@ -9,22 +10,44 @@ 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 + # psql -U maas -h localhost -p 25432 -d maasdb N.B:: + maas user password is written in /etc/maas/regiond.conf + +Some useful commands:: + - \l: show databases; - \dt: show tables; - \d: describe table - - select example: select hostname, status from maasserver_node where status=...; + - select example: select hostname, status from maasserver_node where hostname='ct1-r4-gpu01'; The nodes are recorded in the table **maasserver_node**. -3. Update node, set status=4 (**ready**) +3. Update node, set status=4 (**ready**):: + + update maasserver_node set status=4 where hostname='node_name'; The node becomes ready and we can modify its configuration from the GUI! -4. Update node, set status=6 (**deployed**) +4. Update node, set status=6 (**deployed**):: + + update maasserver_node set status=6 where hostname='node_name'; 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... +N.B for case 2: + +If the node NICs are configured in Bond it is possible to change the MAC address of the Bond interface from the GUI, selecting Bond -> Edit bond, select "Manual MAC address". However, it is not possible to modify the MAC address of the physical interfaces. Use the MAAS CLI to modify them:: + + # get MACHINE_ID from GUI, use it to get the machine's data + maas maas interfaces read $MACHINE_ID > /tmp/interfaces_$MACHINE_ID.json + + # Read IDs of the two 25Gb NICs + read NIC1 NIC2 <<< $( cat /tmp/interfaces_$MACHINE_ID.json | jq '.[] | select(.link_speed==25000) .id' | xargs echo ) + + # Update MAC Address of the two NICs + maas maas interface update $MACHINE_ID $NIC1 mac_address="xx:xx:xx:xx:xx" + +