update-grub runs and fails in containers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Auto Upgrade Testing |
Fix Released
|
Undecided
|
Martin Pitt | ||
grub2 (Ubuntu) |
Fix Released
|
High
|
Colin Watson | ||
Precise |
Fix Released
|
High
|
Colin Watson | ||
Quantal |
Fix Released
|
High
|
Colin Watson | ||
lxc (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Invalid
|
High
|
Serge Hallyn | ||
Quantal |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact] GRUB upgrades fail in containers.
[Test Case] Upgrade the grub-pc package in a container.
[Regression Potential] In itself, this postinst fix should be quite safe. It's possible it won't solve the whole problem - e.g. linux-image-* upgrades calling update-grub - but I wanted to backport just what was in quantal/raring rather than getting creative in an SRU.
[XXX edit - removed the SRU justification for lxc part. The proposed solution
was not safe, and was undone in a later commit. devtmpfs cannot be mounted
in a container, because changes under the container's /dev are then
reflected in the host's /dev.
If grub is installed in a container (as happens, for instance, with the ubuntu-cloud template) then an update of grub or linux-image will cause update-grub to be run. It tries, finds it can't access the root device, fails, and causes the update to fail.
It would be better for update-grub to detect that it is in a container and simply exit 0, so that the apt-get can succeed. I'm attaching a debdiff which does that.
Related branches
tags: | added: patch |
Changed in lxc (Ubuntu): | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in grub2 (Ubuntu): | |
status: | Confirmed → Fix Committed |
assignee: | nobody → Colin Watson (cjwatson) |
Changed in lxc (Ubuntu Precise): | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
description: | updated |
description: | updated |
description: | updated |
Changed in grub2 (Ubuntu Precise): | |
status: | Confirmed → In Progress |
assignee: | nobody → Colin Watson (cjwatson) |
tags: |
added: verification-done removed: verification-needed |
Changed in lxc (Ubuntu Precise): | |
status: | Triaged → Invalid |
Changed in auto-upgrade-testing: | |
status: | New → In Progress |
assignee: | nobody → Martin Pitt (pitti) |
(Marking this confirmed as it has been seen by at least 3 people)
Note that to easily reproduce,
lxc-create -t ubuntu-cloud -n cloud1
lxc-start -n cloud1
(login as ubuntu/ubuntu)
sudo apt-get update && sudo apt-get dist-upgrade # assuming linux-image is slated to be updated.