default fstab could be expanded

Bug #800520 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

proc /var/lib/lxc/lucid-test-lp/rootfs/proc proc nodev,noexec,nosuid 0 0
sysfs /var/lib/lxc/lucid-test-lp/rootfs/sys sysfs defaults 0 0

is what lxc-create creates

However
none /var/lib/lxc/lucid-test-lp/rootfs/dev/pts devpts defaults 0 0
none /var/lib/lxc/lucid-test-lp/rootfs/proc proc nodev,noexec,nosuid 0 0
none /var/lib/lxc/lucid-test-lp/rootfs/sys sysfs defaults 0 0
none /var/lib/lxc/lucid-test-lp/rootfs/var/run tmpfs defaults 0 0

is possibly better :- I don't know if the dev/pts one is needed, but having var/lock and var/run on a tmpfs is what we do for Ubuntu.
/var/lock comes up like that automatically, but not /var/run, at least for me with a lucid container.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This is not currently done because there is not yet a good way for a container to reboot/shutdown. The current workaround involves the container monitor watching the container's utmp which is in /var/run. So if you mount tmpfs on top of /var or /var/run, then the monitor cannot detect container reboot vs shutdown.

There is work in progress to add the kernel support needed for containers to cleanly reboot and shut down,but that must pass through the linux-kernel mailing list.

Since this bug is about fstab, a side effect of the reboot vs shutdown issue, I'm going to mark it Triaged and low priority.

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

This is now fixed in precise, as mountall should be mounting most of those.

An important note - your container should absolutely NOT be mounting devpts. The container startup mounts a new instance of that, and the container should continue to use that. (the kernel semantics are not sufficient to do the right thing no matter how the container mounts devpts) Soon apparmor rules will enforce this.

Changed in lxc (Ubuntu):
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.