lxd
lxd copied to clipboard
Containers using OVN networks get different IPs on reboot.
Required information
- Distribution: Ubuntu
- Distribution version: 22.04 (Jammy)
- The output of "lxc info" or if that fails:
- Kernel version: 5.15.0-71-generic
- Snap Microcloud version: 0+git.f6e4e40 rev. 407
- Snap LXD version: 5.13-cea5ee2 rev. 24758
- Snap Microovn version: 0+git.1177d40 rev. 86
- Storage backend in use: Snap Microceph version 0+git.fdf6d5e rev. 338
Issue description
OVN assigns IPs sequentially. That means if I create two containers then delete one and stop/start the other one, the latter changes IP.
Steps to reproduce
-
lxc launch ubuntu:22.04 test-sticky-ip
lxc launch ubuntu:22.04 test-sticky-ip-2
| test-sticky-ip | RUNNING | 10.47.208.3 (eth0) | | CONTAINER | 0 | host3 |
+------------------+---------+---------------------+------+-----------+-----------+-----------------+
| test-sticky-ip-2 | RUNNING | 10.47.208.4 (eth0) | | CONTAINER | 0 | host2 |
-
lxc delete test-sticky-ip --force
-
lxc stop test-sticky-ip-2
-
lxc start test-sticky-ip-2
- Result
test-sticky-ip-2
get IP previously allocated fortest-sticky-ip
| test-sticky-ip-2 | RUNNING | 10.47.208.3 (eth0) | | CONTAINER | 0 | host2 |