package fails to install: SIOCSIFNETMASK: Cannot assign requested address

Bug #929382 reported by Martin Pitt
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Unassigned

Bug Description

Current lucid->precise upgrade test fails on

Setting up lxc (0.7.5-3ubuntu18) ...
 * Starting Linux Containers
SIOCSIFNETMASK: Cannot assign requested address
iptables: No chain/target/match by that name.
 * Failed to set up LXC network
invoke-rc.d: initscript lxc, action "start" failed.
dpkg: error processing lxc (--configure):
 subprocess installed post-installation script returned error exit status 1

See
https://jenkins.qa.ubuntu.com/view/Precise/job/precise-upgrade-lucid-universe/lastFailedBuild/ARCH=amd64,LTS=lts,PROFILE=universe,label=upgrade-test/

for the full logs.

Related branches

Martin Pitt (pitti)
Changed in lxc (Ubuntu Precise):
importance: Undecided → High
milestone: none → ubuntu-12.04-beta-1
tags: added: dist-upgrade lucid2precise precise qa-daily-testing
Revision history for this message
Martin Pitt (pitti) wrote :

It could potentially be a followup failure from the cgroup-lite failure in bug 929381. However, as this was a dist-upgrade, it was running under a lucid kernel which might not yet support the necessary features. It needs to fail gracefully then.

Revision history for this message
Martin Pitt (pitti) wrote :

I confirm that this is not a consequence of bug 929381. I cannot reproduce this in a lucid live system, so the SIOCSIFNETMASK might be something special in the dist-upgrader test environment?

Revision history for this message
Martin Pitt (pitti) wrote :

I logged into the dist-upgrade tester VM for main-all, and tried to install lxc:

Setting up lxc (0.7.5-3ubuntu20) ...
AppArmor parser error for /etc/apparmor.d/usr.bin.lxc-start in /etc/apparmor.d/usr.bin.lxc-start at line 40: Invalid capability syslog.
 * Starting Linux Containers

dnsmasq: failed to bind listening socket for fe80::ac5d:58ff:fe84:5af4: Address already in use
 * Failed to set up LXC network
invoke-rc.d: initscript lxc, action "start" failed.
dpkg: error processing lxc (--configure):
 subprocess installed post-installation script returned error exit status 2

So this is a different failure, and maybe even not in lxc itself. I think this should also be handled more gracefully.

I'm still trying to reproduce the original error, so that I can set -x the init.d script.

Revision history for this message
Martin Pitt (pitti) wrote :

However, in both cases it apparently fails in the same exit path. It seems that the trapping is meant to call undo_network() on failure (which works), then undo_network() goes all the way to the end, and then the script just exits:

.0.3.1 --dhcp-range 10.0.3.2,10.0.3.254 --dhcp-lease-max=253 --dhcp-no-override --except-interface=lo --interface=lxcbr0

dnsmasq: failed to bind listening socket for fe80::188f:6ff:fe83:141: Address already in use
+ undo_network
+ [ -f /var/run/lxc/dnsmasq.pid ]
+ iptables -t nat -D POSTROUTING -s 10.0.3.0/24 -j MASQUERADE
[...]
+ echo * Failed to set up LXC network
 * Failed to set up LXC network
root@ubuntu:~# echo $?
2

Revision history for this message
Martin Pitt (pitti) wrote :

As the script always exits right away after the trap, the only way that I found to do that cleanly is to add an "exit 0":

undo_network() {
        [...]
        log_failure_msg "Failed to set up LXC network"
        exit 0
}

This allows the package to get configured and not break upgrades even if LXC setup fails for some reason. Does that sound acceptable?

Changed in lxc (Ubuntu Precise):
status: New → Triaged
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

exit 0 sounds fine, thanks.

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

This bug was fixed in the package lxc - 0.7.5-3ubuntu21

---------------
lxc (0.7.5-3ubuntu21) precise; urgency=low

  * debian/lxc.init: Exit cleanly in undo_network(), to avoid the init.d
    script and thus the package installation to fail if the network could not
    be configured for LXC. (LP: #929382)
 -- Martin Pitt <email address hidden> Thu, 09 Feb 2012 16:47:09 +0100

Changed in lxc (Ubuntu Precise):
status: Triaged → Fix Released
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.