I have an Ubuntu 14.04.1 LTS server that's running LXC containers. The containers run Ubuntu 14.04.1 too. Network config of host is pretty standard, static IP, ISP's DNSes (IP1/IP2) plus google's :
$ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 #iface eth0 inet dhcp iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers <IP1> <IP2> 184.108.40.206
No firewalls used on the system.
Now, inside the containers, apt-get works intermittently. After restarting the host and starting the containers, it works fine. But after 'a while' (I haven't measured it) apt-get starts failing:
# apt-get update Ign http://security.ubuntu.com trusty-security InRelease Ign http://security.ubuntu.com trusty-security Release.gpg Ign http://security.ubuntu.com trusty-security Release Ign http://archive.ubuntu.com trusty InRelease <...> W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-i386/Packages 404 Not Found [IP: 220.127.116.11 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-i386/Packages 404 Not Found [IP: 18.104.22.168 80] E: Some index files failed to download. They have been ignored, or old ones used instead.
The sources lists are default. Tried replacing them but made no difference. This happens to all containers. Nothing is changed when restarted. The strange thing is they can ping both IPs and hosts (so DNS probably works ok. Tried pinging google.com, ubuntu.com, archive.ubuntu.com, security.ubuntu.com, always success).
Container network config:
auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp
Regarding LXC config, I use the default for ubuntu, veth device and an lxcbr0 bridge for all containers. I'm very new to LXC so bear with me if I screwed up somewhere...
Any ideas are helpful. Let me know if more info is needed, I'll update the description :)
Thanks for your time
PS: I've already tried the standard "apt-get fails" remedies like this one with no success.