package lxd (not installed) failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1629540 reported by Marian
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

% sudo aptitude full-upgrade
The following packages will be upgraded:
  lxc2 lxd lxd-client
...

Setting up lxd-client (2.3-0ubuntu3~ubuntu16.04.1~ppa1) ...
Setting up lxd (2.3-0ubuntu3~ubuntu16.04.1~ppa1) ...
Installing new version of config file /etc/init.d/lxd ...
Installing new version of config file /etc/init/lxd.conf ...

Old bridge configuration detected in /etc/default/lxd-bridge, upgrading
Unsetting deprecated profile options
Attempting to kill current lxd-bridge
/usr/lib/lxd/upgrade-bridge: 54: /usr/lib/lxd/upgrade-bridge: /usr/lib/lxd/lxd-bridge: not found
/usr/lib/lxd/upgrade-bridge: 58: kill: No such process

Bringing down and renaming existing bridge lxdbr0 to lxd-upgrade
Creating a new LXD bridge
Network lxdbr0 created
Moving the old bridge into place
Configuring the new LXD bridge
Setting IPv4 network to 10.217.241.1/24
Setting IPv4 DHCP range to 10.217.241.2-10.217.241.254
Enabling IPv4 NAT
Setting IPv6 network to fd1b:9dbb:c8d8:6af::1/64
error: Failed to run: ip -6 addr add dev lxdbr0 fd1b:9dbb:c8d8:6af::1/64: RTNETLINK answers: Permission denied
dpkg: error processing package lxd (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up qarte (3.3.0-0ubuntu1) ...
dpkg: dependency problems prevent configuration of lxc2:
 lxc2 depends on lxd; however:
  Package lxd is not configured yet.

dpkg: error processing package lxc2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                            Processing triggers for systemd (229-4ubuntu10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 lxd
 lxc2
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up lxd (2.3-0ubuntu3~ubuntu16.04.1~ppa1) ...

Old bridge configuration detected in /etc/default/lxd-bridge, upgrading
Unsetting deprecated profile options
Attempting to kill current lxd-bridge
/usr/lib/lxd/upgrade-bridge: 54: /usr/lib/lxd/upgrade-bridge: /usr/lib/lxd/lxd-bridge: not found
/usr/lib/lxd/upgrade-bridge: 58: kill: No such process

Bringing down and renaming existing bridge lxdbr0 to lxd-upgrade
Creating a new LXD bridge
error: The network already exists
dpkg: error processing package lxd (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of lxc2:
 lxc2 depends on lxd; however:
  Package lxd is not configured yet.

dpkg: error processing package lxc2 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 lxd
 lxc2

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: lxd (not installed)
ProcVersionSignature: Ubuntu 4.4.0-38.57-lowlatency 4.4.19
Uname: Linux 4.4.0-38-lowlatency x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Sat Oct 1 13:20:34 2016
DpkgHistoryLog:
 Start-Date: 2016-10-01 13:20:08
 Requested-By: marian (1602)
 Upgrade: lxc2:amd64 (2.2-0ubuntu1~ubuntu16.04.1~ppa1, 2.3-0ubuntu3~ubuntu16.04.1~ppa1), qarte:amd64 (3.2.0-0ubuntu1, 3.3.0-0ubuntu1), lxd:amd64 (2.2-0ubuntu1~ubuntu16.04.1~ppa1, 2.3-0ubuntu3~ubuntu16.04.1~ppa1), lxd-client:amd64 (2.2-0ubuntu1~ubuntu16.04.1~ppa1, 2.3-0ubuntu3~ubuntu16.04.1~ppa1)
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2016-05-08 (146 days ago)
InstallationMedia: Ubuntu-MATE 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: lxd
Title: package lxd (not installed) failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marian (mnion) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Stéphane Graber (stgraber) wrote :

Can you please paste the result of:
 - ls -lh /proc/sys/net
 - cat /proc/sys/net/ipv6/conf/default/disable_ipv6
 - cat /proc/sys/net/ipv6/conf/all/disable_ipv6

Thanks

Changed in lxd (Ubuntu):
status: New → Incomplete
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

nick@quelbo:~$ ls -l /proc/sys/net
total 0
dr-xr-xr-x 1 root root 0 Oct 1 19:07 bridge/
dr-xr-xr-x 1 root root 0 Oct 1 17:29 core/
dr-xr-xr-x 1 root root 0 Oct 1 11:28 ipv4/
dr-xr-xr-x 1 root root 0 Oct 1 11:28 ipv6/
dr-xr-xr-x 1 root root 0 Oct 1 19:07 netfilter/
-rw-r--r-- 1 root root 0 Oct 1 19:07 nf_conntrack_max
dr-xr-xr-x 1 root root 0 Oct 1 19:07 unix/
nick@quelbo:~$ cat /proc/sys/net/ipv6/conf/default/disable_ipv6
0
nick@quelbo:~$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0

Revision history for this message
Daniel Cordey (dc-b) wrote :

dc@dcmarac1:~$ ls -l /proc/sys/net
total 0
dr-xr-xr-x 1 root root 0 oct 1 20:19 bridge
dr-xr-xr-x 1 root root 0 oct 1 09:19 core
dr-xr-xr-x 1 root root 0 oct 1 09:19 ipv4
dr-xr-xr-x 1 root root 0 oct 1 09:19 ipv6
dr-xr-xr-x 1 root root 0 oct 1 20:19 iw_cm
dr-xr-xr-x 1 root root 0 oct 1 20:19 netfilter
-rw-r--r-- 1 root root 0 oct 1 20:19 nf_conntrack_max
dr-xr-xr-x 1 root root 0 oct 1 09:19 unix
dc@dcmarac1:~$ cat /proc/sys/net/ipv6/conf/default/disable_ipv6
0
dc@dcmarac1:~$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0

Revision history for this message
Stéphane Graber (stgraber) wrote :

That's odd, so your systems have IPv6 enabled but refuse to add an IPv6 address to an interface... not sure why that would be.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Looking around, the only source for this failure I could see is for when IPv6 is indeed disabled...

So I'll add some logic to the migration script not to migrate bridge settings if IPv6 is completely missing (as in /proc/sys/net/ipv6 doesn't exist) AND add logic to LXD to set disable_ipv6 to 0 for the bridge interface before attempting to set any IPv6 configuration.

But while those two changes make sense, I'm not sure that they are actually relevant for you two since the output you gave me suggests that a new bridge interface should have had disable_ipv6 set to 0 (as a result of inheriting from the default)...

Anyway, maybe we'll get lucky and my fix will actually sort this out because I couldn't find any other reason for a permission denied at ip addr add time other than that...

Revision history for this message
Stéphane Graber (stgraber) wrote :

Any information on reproducing your environment would be much appreciated so I can add it to my test environments for LXD networking.

Revision history for this message
Daniel Cordey (dc-b) wrote :

Here is the list of my interfaces/devices (don't know if it could help)

dc@dcmarac1:~$ ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 78:24:af:a1:37:98 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.224/24 brd 192.168.2.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 fe80::7a24:afff:fea1:3798/64 scope link
       valid_lft forever preferred_lft forever
3: lxd-upgrade: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether f6:00:5d:88:df:06 brd ff:ff:ff:ff:ff:ff
4: lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 1a:f9:8f:fc:83:9b brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.1/24 scope global lxcbr0
       valid_lft forever preferred_lft forever
    inet6 fe80::18f9:8fff:fefc:839b/64 scope link
       valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:ef:22:22:f2 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

Revision history for this message
Stéphane Graber (stgraber) wrote :

That's very odd, so you clearly have IPv6 enabled on your system...

Can you try:

lxc network create test ipv4.address=192.168.100.1/24 ipv4.nat=true ipv6.address=fdb8:8fd4:375c:6f2a::1/64 ipv6.nat=true

And see if this similarly fail?

Revision history for this message
Stéphane Graber (stgraber) wrote :

If this fails, then it may be interesting to do it step by test by hand to see what's going on:

ip link add testbr0 type bridge
ip link set testbr0 up
ifconfig testbr0
cat /proc/sys/net/ipv6/conf/testbr0/disable_ipv6
ip -6 addr add fdb8:8fd4:375c:6f2a::1/64 dev testbr0
ifconfig testbr0

Revision history for this message
Stéphane Graber (stgraber) wrote :

I uploaded a new LXD to yakkety which will tentatively close this bug as it fixes a bunch of IPv6 related issues.

I'm however not convinced that I'm actually fixing the specific problem reported above, so I'm still very interested in the command output from above as well as any more information that'd let me reproduce this.

I'll just re-open this bug based on replies and do any more fixing that's needed in either the migration script or LXD itself.

Revision history for this message
Daniel Cordey (dc-b) wrote :

root@dcmarac1:~# lxc network create test ipv4.address=192.168.100.1/24 ipv4.nat=true

error: Failed to run: dnsmasq -u root --strict-order --bind-interfaces --pid-file=/var/lib/lxd/networks/test/dnsmasq.pid --except-interface=lo --interface=test --listen-address=192.168.100.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/lib/lxd/networks/test/dnsmasq.leases --dhcp-hostsfile=/var/lib/lxd/networks/test/dnsmasq.hosts --dhcp-range 192.168.100.2,192.168.100.254 --listen-address=fd42:a73:a2b6:20f3::1 --dhcp-range fd42:a73:a2b6:20f3::2,fd42:a73:a2b6:20f3:ffff:ffff:ffff:ffff,ra-stateless,ra-names -s lxd -S /lxd/: dnsmasq: failed to create listening socket for 192.168.100.1: Address already in use
root@dcmarac1:~# ipv6.address=fdb8:8fd4:375c:6f2a::1/64 ipv6.nat=true
bash: ipv6.address=fdb8:8fd4:375c:6f2a::1/64: No such file or directory

Revision history for this message
Daniel Cordey (dc-b) wrote :

root@dcmarac1:~# ip link add testbr0 type bridge
root@dcmarac1:~# ip link set testbr0 up
root@dcmarac1:~# ifconfig testbr0
testbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::2836:3cff:fed1:2df3 prefixlen 64 scopeid 0x20<link>
        ether 2a:36:3c:d1:2d:f3 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 29 bytes 3536 (3.5 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@dcmarac1:~# cat /proc/sys/net/ipv6/conf/testbr0/disable_ipv6
0
root@dcmarac1:~# ip -6 addr add fdb8:8fd4:375c:6f2a::1/64 dev testbr0
root@dcmarac1:~# ifconfig testbr0
testbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::2836:3cff:fed1:2df3 prefixlen 64 scopeid 0x20<link>
        inet6 fdb8:8fd4:375c:6f2a::1 prefixlen 64 scopeid 0x0<global>
        ether 2a:36:3c:d1:2d:f3 txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 43 bytes 5820 (5.8 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Revision history for this message
Daniel Cordey (dc-b) wrote :

root@dcmarac1:~# apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up lxd (2.3-0ubuntu3) ...

Old bridge configuration detected in /etc/default/lxd-bridge, upgrading
Unsetting deprecated profile options
Attempting to kill current lxd-bridge
Bringing down and renaming existing bridge lxdbr0 to lxd-upgrade
Creating a new LXD bridge
error: The network already exists
dpkg: error processing package lxd (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 lxd
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Daniel Cordey (dc-b) wrote :

Is there some sort of debug mode which I can use in the config script ?
Or, I don't mind running commands step by step, since it may be the only way to spot the real issue.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

You could probably add a `set -x` to the top of the maintainer script on disk and try again.

Revision history for this message
shemgp (shemgp) wrote :

Had this error while upgrading in yakkety

Network lxdbr0 created
Moving the old bridge into place
Configuring the new LXD bridge
Setting IPv4 network to 10.7.93.1/24
Setting IPv4 DHCP range to 10.7.93.2-10.7.93.254
Enabling IPv4 NAT
Setting IPv6 network to fd88:b7ac:afb7:4c42::1/64
error: Failed to run: ip -6 addr add dev lxdbr0 fd88:b7ac:afb7:4c42::1/64: RTNETLINK answers: Permission denied
dpkg: error processing package lxd (--configure):
 subprocess installed post-installation script returned error exit status 1

Here's output of the test commands:
root@computer:~# ip link add testbr0 type bridge
root@computer:~# ip link set testbr0 up
root@computer:~# ifconfig testbr0
testbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::40c1:ddff:fe5a:63f prefixlen 64 scopeid 0x20<link>
        ether 42:c1:dd:5a:06:3f txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 20 bytes 3732 (3.7 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@computer:~# cat /proc/sys/net/ipv6/conf/testbr0/disable_ipv6
0
root@computer:~# ip -6 addr add fdb8:8fd4:375c:6f2a::1/64 dev testbr0
root@computer:~# ifconfig testbr0
testbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet6 fe80::40c1:ddff:fe5a:63f prefixlen 64 scopeid 0x20<link>
        inet6 fdb8:8fd4:375c:6f2a::1 prefixlen 64 scopeid 0x0<global>
        ether 42:c1:dd:5a:06:3f txqueuelen 1000 (Ethernet)
        RX packets 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 38 bytes 7108 (7.1 KB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Revision history for this message
Daniel Cordey (dc-b) wrote :

The fact is that I don't know where (in which file) it fails.
It seems that cc_lxd.py is responsible to create the bridge, but this file is located in a read-only mounted file system (/snap), and though can't be changed as is. It's rather difficult to extract, modify and run these files in a different environement (sys.modules settings...). But I'm sure there must be a way to do it; I just need some clue on what I could do and how.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Daniel:

Ok, so based on output, it looks like you got half migrated. Can you try:
  lxc network set lxdbr0 ipv6.address fdb8:8fd4:375c:6f2a::1/64
  lxc network set lxdbr0 ipv6.nat true

If that succeeds (don't see why it would, but who knows), then you can do:
  mv /etc/default/lxd-bridge /etc/default/lxd-bridge.migrated

And you should be good to go, though that wouldn't bring me much closer to figuring out why you're getting that permission denied in the first place...

Revision history for this message
Stéphane Graber (stgraber) wrote :

Can I also ask you for "sysctl -a"? Some kind of odd kernel configuration on that machine is still my best bet as far as what could cause those symptoms...

Revision history for this message
Daniel Cordey (dc-b) wrote :

root@dcmarac1:~/ubuntu_lxd# lxc network set lxdbr0 ipv6.address fdb8:8fd4:375c:6f2a::1/64
root@dcmarac1:~/ubuntu_lxd# lxc network set lxdbr0 ipv6.nat true
root@dcmarac1:~/ubuntu_lxd# mv /etc/default/lxd-bridge /etc/default/lxd-bridge.migrated
root@dcmarac1:~/ubuntu_lxd# apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up lxd (2.3-0ubuntu3) ...
root@dcmarac1:~/ubuntu_lxd# sysctl -a >sysctl.out
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.docker0.stable_secret"
sysctl: reading key "net.ipv6.conf.enp3s0.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
sysctl: reading key "net.ipv6.conf.lxcbr0.stable_secret"
sysctl: reading key "net.ipv6.conf.lxd-upgrade.stable_secret"
sysctl: reading key "net.ipv6.conf.lxdbr0.stable_secret"
sysctl: reading key "net.ipv6.conf.testbr0.stable_secret"
root@dcmarac1:~/ubuntu_lxd#

See the attached file for stdout output

I seems it did it...

Revision history for this message
Stéphane Graber (stgraber) wrote :

That's very confusing since that's effectively what the upgrade script did, but okay, glad that it worked :)

Revision history for this message
Stéphane Graber (stgraber) wrote :

Just did a diff of your sysctl with the ones on my laptop and I'm not seeing anything obvious. The few differences in network configuration don't actually affect lxdbr0, the rest of the changes are things I fixed in my latest upload (which should be released soon).

One thing I will do in an upcoming upload is change the upgrade script to better deal with failure. It should at the very least leave your system in a state where you can retry the upgrade which doesn't appear to be the case right now.

Revision history for this message
Daniel Cordey (dc-b) wrote :

Looking at the 'bugged' output :
...
error: Failed to run: ip -6 addr add dev lxdbr0 fd88:b7ac:afb7:4c42::1/64:
RTNETLINK answers: Permission denied
...

Though, we may look at the 'ip' source code for the real explanation of the message. This is not a 'address already in use' but a permission problem...

It's hard to trace in the source code, since the message is being issued in an infinite loop of a"message receiver" function (rtnl_talk() from libnetlink.c). This chained calls seems to follow :

genl_init_handle()->genl_resolve_family()->rtn_talk()

but I'm stuck at this level. This "permission denied" seems rather strange...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxd - 2.3-0ubuntu4

---------------
lxd (2.3-0ubuntu4) yakkety; urgency=medium

  * Cherry-pick upstream fixes:
    - Fix typo discovered by lintian
    - network: Allow nil network config
    - network: Fix rare race-condition with sysctl
    - network: Fix IPv6 forwarding logic
    - test: Make container cleanup more reliable
    - network: Properly catch ENOENT
    - network: Better deal with partially disabled IPv6 (LP: #1629540)
  * Fix invalid upstart job
  * Bugfix for migration script
    - Don't print error on missing lxd-bridge script
    - Don't attempt to setup IPv6 if the host kernel has it disabled

 -- Stéphane Graber <email address hidden> Sat, 01 Oct 2016 20:41:41 -0400

Changed in lxd (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Daniel Cordey (dc-b) wrote :

> One thing I will do in an upcoming upload is change the upgrade script to better deal
> with failure

Yes, good idea :-)

I no longer have a /etc/default/lxd-bridge file on my system, but isn't it necessary for setting up the lxd bridge at boot time ? Or, will it fall back to standard settings for IPV4 and ignore IPV6 ?

Revision history for this message
Stéphane Graber (stgraber) wrote :

Yeah, the only reference I could find on permission denied is if IPv6 is disabled for the device, but all of you showed that disable_ipv6 was set to 0...

As for bridge settings, LXD 2.3 supports bridge configuration natively inside LXD, you can list, edit, create, ... bridges using the "lxc network" command. The script that failed for you is the migration script which converts from /etc/default/lxd-bridge over to the new format.

Once it's done, it moves /etc/default/lxd-bridge to /etc/default/lxd-bridge.upgraded.

Changed in lxd (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Stéphane Graber (stgraber) wrote :

Moving the issue back to incomplete as I'm not satisfied we've gotten to the bottom of this... though it's still unclear exactly what's causing that permission denied error, especially when it then succeeds when you ran it manually a bit later...

Revision history for this message
Stéphane Graber (stgraber) wrote :

Uploaded a new lxd to the archive which will allow the upgrade script to be re-run after a failure. That should give it more of a chance to recover and also make it easier to figure out what's going on.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

I worked around this by purging lxd during the upgrade, so I'll give it a try and see if at least a fresh install is good here.

Revision history for this message
Stéphane Graber (stgraber) wrote :

A fresh install shouldn't trigger the migration script at all, so you should be fine.

It'd however be interesting to know if the following works for you then:
 - lxc network create lxdbr0
 - lxc network attach-profile lxdbr0 default eth0

If that doesn't blow up, then it'd match what Daniel reported, where apparently creating a new bridge with IPv6 enabled (as is our default) does work...

Revision history for this message
Stéphane Graber (stgraber) wrote :

Haven't heard of any more report of this, which means that you were either the only few to hit some weird race or I somehow fixed the problem :)

Anyway, closing this as fix released, let me know if this still affects you somehow.

Changed in lxd (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
drplix (pjr-1060) wrote :

Hi Stéphane - I know this is closed but I came across a similar failure after migrating from 16.04 to 16.10. As above the migration of /etc/default/lxd-bridge failed and left me with no networking in the lxd containers.

After a lot of hunting I found that the migration script did not correctly handle the migration of the LXD_CONFILE setting. (I have some dnsmasq dhcp-host entries to ensure my containers get reliable IP4 addresses.)

What I had in /etc/default/lxd-bridge was this...

LXD_CONFILE="/etc/lxd/dnsmasq.conf"

But what got set up by the migration script in: lxc network edit lxdbr0

raw.dnsmasq: conf-file /etc/lxd/pjr-dnsmasq.conf

Note: this is missing an equals sign after conf-file and should be...

raw.dnsmasq: conf-file=/etc/lxd/pjr-dnsmasq.conf

Without that dnsmasq always fails and my hosts had no IP4 networking.

Would be great if the migration script can be changed so that anyone else moving from 16.04 LTS doesn't have this problem.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Oh, thanks for that, I'll fix the migration script in the next upload to sort that out.
Always found the format of that config file to be confusing :)

Revision history for this message
Stéphane Graber (stgraber) wrote :

Fix pushed to our packaging branch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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