Ubuntu

keep container from marking shared rootfs readonly on shutdown

Reported by Serge Hallyn on 2012-02-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
High
Serge Hallyn

Bug Description

When a container shuts down, it tries to

   mount -o remount,ro /

If the container's '/' is a separate blockdev, that's fine.

If the container's '/' is on the host's rootfs, that's usually fine - because something, somewhere, on the system will have a file open which will make the readonly remount fail.

But if the container rootfs is a directory under /var/lib/lxc/<container>/rootfs, and /var/lib/lxc is a separate filesystem, and no other container is running, then that filesystem will be marked readonly, causing future container starts or creations to fail.

lxc-start needs to hold a file open for write for the duration of the container's run. '${rootfs}.hold' should be good.

Related branches

Changed in lxc (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in lxc (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Serge Hallyn (serge-hallyn) wrote :

Fix committed to ubuntu:lxc

Changed in lxc (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.7.5-3ubuntu31

---------------
lxc (0.7.5-3ubuntu31) precise; urgency=low

  * 0050-clone-lvm-sizes: make lxc-clone with lvm snapshots create a
    snapshot of the same size as the original. (LP: #939765)
  * run our dnsmasq as user 'lxc-dnsmasq' (LP: #939774)
    - add debian/lxc.postinst to create the user
    - debian/lxc.lxc-net.upstart: run dnsmasq as lxc-dnsmasq user
  * 0051-lxc-create-lvm-use-1G: bump lvm blockdev size to 1G (LP: #942338)
  * 0052-ubuntu-bind-user-conflict: don't create 'ubuntu' user when a user
    gets bound in. (LP: #942144)
  * 0053-lxc-start-pin-rootfs: don't let the container remount an underlying
    shared fs readonly (LP: #942325)
  * 0054-ubuntu-debug: add --debug option to ubuntu and ubuntu-cloud
    templates (LP: #942847)
  * 0055-ubuntu-handle-badgrp: fix the group handling to not assume a user's
    group has the user's name. (LP: #942850)
 -- Serge Hallyn <email address hidden> Tue, 28 Feb 2012 15:03:45 -0600

Changed in lxc (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers