[lxc-users] Race condition in IPv6 network configuration

MegaBrutal megabrutal at gmail.com
Tue Nov 7 10:45:00 UTC 2017


Hi Marat,

First of all, I also suggest you to comment out the line
"lxc.net.0.flags = up" in your LXC container configuration
(/var/lib/lxc/containername/config). (Note, if you have an older
version of LXC, the line is "lxc.network.flags", if I remember
correctly.) Probably it would help your container to have it bring up
an interface from DOWN state, than to configure an interface which is
already UP and probably is in ambiguous state.


2017-11-07 8:17 GMT+01:00 Marat Khalili <mkh at rqc.ru>:
>
> Until someone finds proper solution of your problem, I suggest you to:
>
> 1) Restart not the whole container but something smaller, like networking or
> specific interface.

Actually, that's more cumbersome. I'd have to remove all IPs, routes,
and bring the interface down (ip link set dev eth0 down), and then run
ifup. A reboot is quicker, as I don't run heavy applications in the
problematic containers.

I also tried ifdown, but that usually doesn't work, because as far as
the system is concerned, the interface is not configured (as it failed
configuration when ifupdown tried to bring it up, so it is in a
half-configured state).

>
> 2) Automate check and restart as I did.

At least I monitor it with Zabbix.

>
> 3) Write systemd service for this if you have enough time at hand, then
> share it :)

Yes, but it feels like a workaround. I'd prefer to know the cause and
find a better solution.


More information about the lxc-users mailing list