mounted-dev must not re-create consoles in a container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn | ||
Precise |
Invalid
|
Undecided
|
Unassigned | ||
mountall (Ubuntu) |
Fix Released
|
High
|
Steve Langasek | ||
Precise |
Fix Released
|
High
|
Stéphane Graber |
Bug Description
mounted-dev.conf always does MAKEDEV console. MAKEDEV doesn't just make the devices, it first removes them.
When a container starts, it sets up /dev/console and /dev/lxc[1-4] as bind mounts of ptys on the host, for use as lxc consoles. If mounted-dev deletes and recreates those, then none of the lxc consoles work.
A simple patch which stops it from breaking lxc consoles is at lp:~serge-hallyn/ubuntu/quantal/mountall/mountall-lxc . However looking back at it, I think it would be ok to do a further check for whether /dev/console exists. If it does not exist, then MAKEDEV console anyway. This isn't necessary, just a thought.
== SRU ==
=== Rationale ===
This bug was fixed in trusty but still affects precise LXC containers that are brought up with /dev mounted as something other than a devtmpfs (which is the case with LXC 1.1).
=== Test case ===
- Install LXC 1.1 (from ppa:ubuntu-
- sudo lxc-create -t download -n precise -- -d ubuntu -r precise -a amd64
- sudo lxc-start -n precise -F
That will hang at a blank screen even though the container is functional.
- sudo lxc-attach -n precise -- apt-get dist-upgrade -y
- sudo lxc-attach -n precise -- reboot
And at that point, getty should show up fine in the lxc-start shell.
=== Regression potential ===
Not expecting any, the change is straightforward and has been in Ubuntu since raring.
tags: | added: screencast |
tags: | removed: screencast |
Changed in mountall (Ubuntu): | |
assignee: | nobody → Steve Langasek (vorlon) |
status: | New → Triaged |
Changed in mountall (Ubuntu): | |
status: | Triaged → Fix Committed |
Marking high priority because without this we cannot use separate /dev partitions in a container.