[Bug 964882] Re: Static IPv6 configuration fails in lxc guests because of readonly /proc/sys
Stéphane Graber
stgraber at stgraber.org
Thu Mar 29 15:47:11 UTC 2012
Not being able to set autoconf=0 when using static is certainly a situation where you want ifup to fail.
When you set a static IP you usually don't want to get SLAAC to happen and set some extra IPs on your interface.
Marking the ifupdown task as invalid, systems are expecting to have
writable /proc/sys and the network namespaces work perfectly fine for
anything in /proc/sys/net so no need to restrict that by making it read-
only.
** Changed in: libvirt (Ubuntu)
Status: Confirmed => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ifupdown in Ubuntu.
https://bugs.launchpad.net/bugs/964882
Title:
Static IPv6 configuration fails in lxc guests because of readonly
/proc/sys
Status in “ifupdown” package in Ubuntu:
Invalid
Status in “libvirt” package in Ubuntu:
Confirmed
Bug description:
This is a complex issue, libvirt driver for lxc sets /proc and
/proc/sys as readonly which can be seen as a good thing, however ifup
wants to set sysctl net.ipv6.conf.eth0.autoconf=0 which fails and ifup
exits early failing to set the ip address of the interface.
STR:
1. Create a precise VM using lxc-create
2. Inside the rootfs, modify the /etc/network/interfaces to read something like:
```
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.20
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
iface eth0 inet6 static
address 2a01:d0:801a::2:1
netmask 64
gateway 2a01:d0:801a::1
```
Feel free to change the address/gateway - those are used by my machines now.
3. Boot the container.
Expected results:
IPv6 address is assigned.
Actual results:
There is no IPv6 address assigned.
Attempting to ifdown eth0 fails because it is seen as not configured, ifup eth0 fails right after configuring the ipv4 connection, when it disables autoconfiguration using sysctl.
One can work around this using a terrible hack of replacing sysctl
with some sort of script or binary that returns successfully on every
request.
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libvirt-bin 0.9.8-2ubuntu14
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
Date: Mon Mar 26 02:56:35 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120225)
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/964882/+subscriptions
More information about the foundations-bugs
mailing list