container does not receive IP address after 15.04 upgrade

Bug #1451232 reported by Kevin Dalley
This bug report is a duplicate of:  Bug #1240757: Bridge not created if bind9 is on. Edit Remove
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Triaged
Critical
Unassigned

Bug Description

Perhaps this is an upgrade issue, perhaps it is a installation issue.

In either case, there should be more information about upgrading lxc.

After upgrading to Ubuntu 15.04, my container no longer started.

After upgrading, I had to remove the following line from the config file for my container:

lxc.network.link = lxcbr0

Here is the attempt at starting before commenting out the line:

kevin@nereocystis:~$ sudo lxc-start -F -n escale_build
lxc-start: conf.c: instantiate_veth: 2660 failed to attach 'vethTCPSQO' to the bridge 'lxcbr0': Operation not permitted
lxc-start: conf.c: lxc_create_network: 2943 failed to create netdev
lxc-start: start.c: lxc_spawn: 914 failed to create the network
lxc-start: start.c: __lxc_start: 1164 failed to spawn 'escale_build'
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

After commenting out this line, the container starts, but no IP address is assigned in the container.

But no IP address was assigned:

For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/9a:9b:92:81:87:62
Sending on LPF/eth0/9a:9b:92:81:87:62
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.

Eventually, I purged lxc, and reinstalled it, with the same results.

I also tried creating a new container from scratch using the instructions in:

https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-network

sudo lxc-create --template download --name u1

Again, no IP address.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: lxc 1.1.2-0ubuntu3
ProcVersionSignature: Ubuntu 3.19.0-15.15-generic 3.19.3
Uname: Linux 3.19.0-15-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Sun May 3 10:44:23 2015
InstallationDate: Installed on 2013-06-02 (699 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
KernLog:
 [56541.698842] audit: type=1400 audit(1430671655.848:49): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxc-container-default" name="/" pid=3109 comm="mount" flags="ro, remount, relatime"
 [56620.060697] audit: type=1400 audit(1430671734.154:50): apparmor="DENIED" operation="mount" info="failed type match" error=-13 profile="lxc-container-default" name="/sys/fs/cgroup/" pid=3403 comm="systemd" flags="ro, nosuid, nodev, noexec, remount, strictatime"
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
 lxc.network.hwaddr = 00:16:3e:xx:xx:xx

Revision history for this message
Kevin Dalley (nereocystis) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Do you start this container as root or as an unprivileged user?

Does lxcbr0 exist on the host? What do

ps -ef | grep lxcbr0
sudo brctl show

show? Please show the (original, unmodified) container configuration.

Changed in lxc (Ubuntu):
status: New → Incomplete
Revision history for this message
Kevin Dalley (nereocystis) wrote :

Thanks.

No sign of lxcbr0.

kevin@nereocystis:/home/kevin$ ps -ef | grep lxcbr0
kevin 17684 17583 0 13:06 pts/0 00:00:00 grep lxcbr0

I attached the original config file which does not work under 15.04, but did work under 14.10 and 14.04.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1451232] Re: container does not receive IP address after 15.04 upgrade

Thanks - could you please try

sudo systemctl stop lxc-net
sudo systemctl start lxc-net

then see whether 'ps -ef | grep lxcbr0' shows a result? If it does
not, repeat up to two more times (and then just give up and let us know :)

If lxcbr0 does show up, does the container (with its original config)
come up fine?

I've had this issue too - the lxc-net systemd job appears to not be
correct, or it interacts badly with network-manager. It doesn't just
not show up, it also disappears quite often.

Changed in lxc (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Kevin Dalley (nereocystis) wrote :

Thanks. That works.

Stopping and starting systemtl once fixed the problem.

I did have some issues with the upgrade in general, and discovered a memory problem. Bad memory is now gone.

Perhaps that was responsible for some of the problem. Perhaps not.

I expected that reinstalling lxc with good memory should have fixed any problem caused by bad memory.

Revision history for this message
Kevin Dalley (nereocystis) wrote :

And, so far, these steps are needed each time I reboot. 2 reboots after initial success.

As you suggested, stopping and restarting the lxc-net systemd job is necessary. Just starting it does not work.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks. I'm going to mark this a dup of 1452601 which has some more information to suggest a possible fix.

Changed in lxc (Ubuntu):
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.