[lxc-users] /etc/resolv.conf occasionally does not get written in LXC container with static conf
Marat Khalili
mkh at rqc.ru
Fri Jun 9 06:59:03 UTC 2017
Occasionally after reboot of the host the /etc/resolv.conf file in some
container comes up containing only two comment lines (taken from
/etc/resolvconf/resolv.conf.d/head). It should be filled in accordance
with dns-nameservers line in /etc/network/interfaces (network
configuration is all static), but it doesn't, though IP address is
assigned correctly. Any of the following fixes the problem:
* /etc/init.d/resolvconf reload
* ifdown/ifup
* lxc-stop/lxc-start
* lxc-attach shutdown -r now
What's bizzare is there're many containers with similar configuration on
this host (actually, most created with the same script), but they
usually come up ok, and there's nothing particularly different in
successful and unsuccessful syslogs until some service inside (e.g.
Apache) realizes it's got no DNS.
Since it is hard to reproduce the problem without rebooting production
server, I don't even know where to dig. Probably someone has seen this
kind of behaviour before?
It's Ubuntu 16.04 on both host and container:
Linux host 4.4.0-79-generic #100-Ubuntu SMP Wed May 17 19:58:14 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux
--
With Best Regards,
Marat Khalili
More information about the lxc-users
mailing list