Static IPv6 configuration fails in lxc guests because of readonly /proc/sys
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ifupdown (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
libvirt (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
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.
STR:
1. Create a precise VM using lxc-create
2. Inside the rootfs, modify the /etc/network/
```
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
ProcVersionSign
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)
Changed in ifupdown (Ubuntu): | |
importance: | Undecided → Medium |
Thanks for reporting this bug.
Did you have an idea for how to best solve this?
Can this be seen as a bug in ifupdown instead? Since you say that if the sysctl is refused, it all works anyway, it sounds like it should not be failing on account of not being able to set the sysctl?
If a change in libvirt is required, then we need to do this in concert with the upstream mailing list, as it seems to require an api change.