BastilleBSD / bastille

Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD.
https://bastillebsd.org
BSD 3-Clause "New" or "Revised" License
858 stars 139 forks source link

Can't start Jail due to ifconfig: ioctl (SIOCAIFADDR): File exists #730

Open tobybryans opened 2 weeks ago

tobybryans commented 2 weeks ago

I had to increase storage on a FreeBSD 14.1 VM last night which needs a powerdown. When I bought it up again one of my Bastille jails refused to come up with the following error:

[spamd]:
ifconfig: ioctl (SIOCAIFADDR): File exists
jail: spamd: /sbin/ifconfig bastille0 inet 10.13.0.8 netmask 255.255.255.255 alias: failed

All other jails started fine. I tried manually staring and stopping, but it still wouldn't come up with the same error.

I destroyed the jail, tried to recreate it and the same thing happened on jail creation.

I recreated it on another IP (10.13.0.25) and it worked fine.

an ifconfig returns the following:

ifconfig bastille0
bastille0: flags=1008049<UP,LOOPBACK,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet 10.13.0.1 netmask 0xffffffff
        inet 10.13.0.7 netmask 0xffffffff
        inet 10.13.0.10 netmask 0xffffffff
        inet 10.13.0.9 netmask 0xffffffff
        inet 10.13.0.12 netmask 0xffffffff
        inet 10.13.0.5 netmask 0xffffffff
        inet 10.13.0.14 netmask 0xffffffff
        inet 10.13.0.4 netmask 0xffffffff
        inet 10.13.0.19 netmask 0xffffffff
        inet 10.13.0.11 netmask 0xffffffff
        inet 10.13.0.6 netmask 0xffffffff
        inet 10.13.0.21 netmask 0xffffffff
        inet 10.13.0.2 netmask 0xffffffff
        inet 10.13.0.3 netmask 0xffffffff
        inet 10.13.0.16 netmask 0xffffffff
        inet 10.13.0.17 netmask 0xffffffff
        inet 10.13.0.18 netmask 0xffffffff
        inet 10.13.0.22 netmask 0xffffffff
        inet 10.13.0.24 netmask 0xffffffff
        inet 10.13.0.20 netmask 0xffffffff
        inet 10.13.0.23 netmask 0xffffffff
        inet 10.13.0.15 netmask 0xffffffff
        inet 10.13.0.25 netmask 0xffffffff
        inet6 fe80::1%bastille0 prefixlen 64 scopeid 0x3
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

and 10.13.0.8 is not on that list (or on any other interfaces).

I am at a bit of a loss of how to debug this further, so any advice would be greatly appreciated, and I fully understand that this may not be a Bastille issue, so if that is the case happy to take the ticket elsewhere.