Hi LXD folks, I need your support to resolve following issue.
I have created bunch of lxd containers using juju budle, and I added two containers manually. Everything was working properly. After VM host holding lxd containers was restarted my juju controller lxd container got different IP address (172.30.30.174) comparing to initial one 172.30.30.175 received during the deployment. The later IP was assigned to completely different container without juju service. So I could not reach controller due to IP mismatch. I manually exchanged IPs between those two containers but after some time previous IP got assigned back ( juju-212b45-0 and pro-on-prem):
lxc list
±---------------------------±--------±---------------------±-----±----------±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±---------------------------±--------±---------------------±-----±----------±----------+
| airgapped-snap-store-proxy | RUNNING | 172.30.30.119 (eth0) | | CONTAINER | 0 |
±---------------------------±--------±---------------------±-----±----------±----------+
| juju-212b45-0 | RUNNING | 172.30.30.175 (eth0) | | CONTAINER | 0 |
| | | 172.30.30.174 (eth0) | | | |
±---------------------------±--------±---------------------±-----±----------±----------+
| juju-f21f6d-0 | RUNNING | 172.30.30.13 (eth0) | | CONTAINER | 0 |
±---------------------------±--------±---------------------±-----±----------±----------+
| juju-f21f6d-1 | RUNNING | 172.30.30.164 (eth0) | | CONTAINER | 0 |
±---------------------------±--------±---------------------±-----±----------±----------+
| juju-f21f6d-2 | RUNNING | 172.30.30.249 (eth0) | | CONTAINER | 0 |
±---------------------------±--------±---------------------±-----±----------±----------+
| juju-f21f6d-3 | RUNNING | 172.30.30.111 (eth0) | | CONTAINER | 0 |
±---------------------------±--------±---------------------±-----±----------±----------+
| pro-on-prem | RUNNING | 172.30.30.175 (eth0) | | CONTAINER | 0 |
| | | 172.30.30.174 (eth0) | | | |
±---------------------------±--------±---------------------±-----±----------±----------+
Is it expected behavior that IP address of the lxd container has changed after host restart? I though lxd dnsmask binds an IP addresses based on lxd icontainer interface mac address and they stay static. Is there any efficient way to assign proper IP to the container on lxd managed network without risk to be reassigned to another?