lxc-start should get a close-all-fds option to avoid weird issues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn | ||
upstart (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
root@vorash:~# cat /var/log/
+ [ -f /etc/default/lxc ]
+ . /etc/default/lxc
+ LXC_AUTO=true
+ USE_LXC_
+ LXC_BRIDGE=lxcbr0
+ LXC_ADDR=10.0.3.1
+ LXC_NETMASK=
+ LXC_NETWORK=
+ LXC_DHCP_
+ LXC_DHCP_MAX=253
+ [ xtrue = xtrue ]
+ ls /etc/lxc/
+ basename /etc/lxc/
+ c=v6test01
+ lxc-info -n v6test01
+ grep state
+ grep -q RUNNING
+ lxc-start -l debug -o /run/debug -n v6test01 -f /etc/lxc/
root@vorash:~# cat /run/debug
lxc-start 1329097397.477 ERROR lxc_start - inherited fd 21 on socket:[17416]
The first listing is the output of lxc.conf running with "set -x" and upstart logging with an added "-l debug -o /run/debug" to the lxc-start command line.
The second is the output in /run/debug
Apparently lxc-start is inheriting an fd from upstart causing lxc to fail to start.
I'm marking this high against lxc and also adding an upstart task in case we're inheriting this fd from some upstart issue.
Related branches
Changed in lxc (Ubuntu): | |
importance: | Undecided → High |
Interesting, I didn't get this in my original testing of the upstart job.
Do you know which file is open? (ls -l /proc/< pid-of- lxc-start/ fd should show it)
The lxc.conf upstart job could, I suppose, explicitly close all fds under 1024, but in my opinion this is simply a bug in upstart. It should not start jobs with open fds. SELinux would prevent jobs from starting too.