Hello.
We are using static IPs in the FAN network. But when we had migrated LXD from version 3.x to 4.x, we faced with an error. When we’re trying to set a static IP address for the FAN of the container network we see the error:
root@ubuntu1-test-fun-on-lxd4:~# lxc config device set test eth1 ipv4.address 10.10.1.10;
Error: Invalid devices: Device validation failed for "eth1": Cannot specify "ipv4.address" when DHCP is disabled on network "fanbr0"
We checked dnsmasq – it’s working:
root@ubuntu1-test-fun-on-lxd4:~# ps aux | grep dns | grep fan
lxd 29574 0.0 0.0 43656 2604 ? S Jan26 0:02 dnsmasq --strict-order --bind-interfaces --pid-file=/var/snap/lxd/common/lxd/networks/fanbr0/dnsmasq.pid --except-interface=lo --no-ping --interface=fanbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.10.95.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/fanbr0/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/fanbr0/dnsmasq.hosts --dhcp-range 10.10.95.2,10.10.95.254 -s lxd -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/fanbr0/dnsmasq.raw -u lxd
How we’ve found out, the error occurs because of this update of the code.
Is it possible to set static IPs for the fan network in version 4.x, or should we use another way?