Hi all,
Today I found a very funny bug in lxd.
Very simple case, I am using a script to provision instances:
#!/bin/bash
[[ -n "$(lxc ls | grep maas-ha)" ]] && lxc stop maas-ha-1 maas-ha-2 maas-ha-3 maas-ha-db-1 maas-ha-db-2 maas-proxy-1 maas-vault-1 && lxc delete maas-ha-1 maas-ha-2 maas-ha-3 maas-ha-db-1 maas-ha-db-2 maas-proxy-1 maas-vault-1
lxc launch images:ubuntu/jammy/cloud maas-ha-1 -p container-vlan10-maas --target infra1 -c user.network-config="$(cat /home/mother/cloud-init-scripts/network-config-infra-container-maas.yaml | sed -e 's/IP_ADDR_10/10.10.10.101/g;s/IP_GATEWAY/10.10.10.1/g;s/IP_ADDR_99/10.10.99.101/g')"
lxc launch images:ubuntu/jammy/cloud maas-ha-2 -p container-vlan10-maas --target infra2 -c user.network-config="$(cat /home/mother/cloud-init-scripts/network-config-infra-container-maas.yaml | sed -e 's/IP_ADDR_10/10.10.10.102/g;s/IP_GATEWAY/10.10.10.1/g;s/IP_ADDR_99/10.10.99.102/g')"
lxc launch images:ubuntu/jammy/cloud maas-ha-3 -p container-vlan10-maas --target infra3 -c user.network-config="$(cat /home/mother/cloud-init-scripts/network-config-infra-container-maas.yaml | sed -e 's/IP_ADDR_10/10.10.10.103/g;s/IP_GATEWAY/10.10.10.1/g;s/IP_ADDR_99/10.10.99.103/g')"
sleep 5
lxc launch images:ubuntu/jammy/cloud maas-ha-db-1 -p container-vlan10 --target infra1 -c user.network-config="$(cat /home/mother/cloud-init-scripts/network-config-infra-container.yaml | sed -e 's/IP_ADDR_10/10.10.10.105/g;s/IP_GATEWAY/10.10.10.1/g')"
lxc launch images:ubuntu/jammy/cloud maas-ha-db-2 -p container-vlan10 --target infra2 -c user.network-config="$(cat /home/mother/cloud-init-scripts/network-config-infra-container.yaml | sed -e 's/IP_ADDR_10/10.10.10.106/g;s/IP_GATEWAY/10.10.10.1/g')"
sleep 5
lxc launch images:ubuntu/jammy/cloud maas-proxy-1 -p container-vlan10 --target infra1 -c user.network-config="$(cat /home/mother/cloud-init-scripts/network-config-infra-container.yaml | sed -e 's/IP_ADDR_10/10.10.10.104/g;s/IP_GATEWAY/10.10.10.1/g')"
lxc launch images:ubuntu/jammy/cloud maas-vault-1 -p container-vlan10 --target infra2 -c user.network-config="$(cat /home/mother/cloud-init-scripts/network-config-infra-container.yaml | sed -e 's/IP_ADDR_10/10.10.10.107/g;s/IP_GATEWAY/10.10.10.1/g')"
Script executes correctly and at the end I want to check the machines and seeing:
mother@infra3:~$ lxc ls --project maas
+--------------+---------+---------------------+------+-----------+-----------+----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-ha-3 | RUNNING | 240.13.0.74 (eth1) | | CONTAINER | 0 | infra3 |
| | | 10.10.99.103 (eth3) | | | | |
| | | 10.10.10.103 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-proxy-1 | RUNNING | 240.11.0.177 (eth1) | | CONTAINER | 0 | infra1 |
| | | 10.10.10.104 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-proxy-1 | RUNNING | 240.11.0.177 (eth1) | | CONTAINER | 0 | infra1 |
| | | 10.10.10.104 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-proxy-1 | RUNNING | 240.11.0.177 (eth1) | | CONTAINER | 0 | infra1 |
| | | 10.10.10.104 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-proxy-1 | RUNNING | 240.11.0.177 (eth1) | | CONTAINER | 0 | infra1 |
| | | 10.10.10.104 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-vault-1 | RUNNING | 240.12.0.48 (eth1) | | CONTAINER | 0 | infra2 |
| | | 10.10.10.107 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-vault-1 | RUNNING | 240.12.0.48 (eth1) | | CONTAINER | 0 | infra2 |
| | | 10.10.10.107 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-vault-1 | RUNNING | 240.12.0.48 (eth1) | | CONTAINER | 0 | infra2 |
| | | 10.10.10.107 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
| maas-vault-1 | RUNNING | 240.12.0.48 (eth1) | | CONTAINER | 0 | infra2 |
| | | 10.10.10.107 (eth2) | | | | |
+--------------+---------+---------------------+------+-----------+-----------+----------+
As far as I know, Aprilâs fool is in one month
The instances exist and are reachable but itâs kind of irritating to not to be able to see them
Thanks
Mateusz