config-grub does not run

Bug #683890 reported by Scott Moser on 2010-12-01
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Low
Unassigned
Lucid
High
Unassigned

Bug Description

Binary package hint: cloud-init

In testing bug 671103, I realised that the 'config-grub' code that was added is not actually invoked on boot. As a result, the changes will not seed grub2 correctly.

What should happen on first boot is that 'h_config_grub' in 'CloudConfig.py' should run and 'grub-pc/install_devices' and 'grub-pc/install_devices_empty' should get seeded.

Unfortunately, the fix added doesn't get that code invoked, and as a result, these values are not seeded.

What we see is:
$ debconf-get-selections 2>/dev/null | grep grub-pc/install
grub-pc grub-pc/install_devices_failed boolean false
grub-pc grub-pc/install_devices multiselect
grub-pc grub-pc/install_devices_disks_changed multiselect
grub-pc grub-pc/install_devices_empty boolean false

What we *should* see on EC2 is:
$ debconf-get-selections 2>/dev/null | grep grub-pc/install
grub-pc grub-pc/install_devices_failed boolean false
grub-pc grub-pc/install_devices_disks_changed multiselect
grub-pc grub-pc/install_devices_empty boolean true
grub-pc grub-pc/install_devices string

Without those variables set, the user will be prompted on grub update.

===== SRU Information =====
* impact of the bug: this bug in cloud-init does not deliver a fix for bug 683379 that I hoped it would. The result is that on upgrade of grub-pc, the user is prompted to verify they do not need to install grub even if they have DEBIAN_FRONTEND=noninteractive.
* how the bug has been addressed: In maverick, the same code runs in a different way. When I pulled the change back to lucid, i didn't get the code invoked.
* minimal patch: The changes are available in my branch at [1], the diff from that which entered -proposed under bug 671103 can be seen from tip of the branch to revision 19. [2].
* instructions on how to reproduce the bug:
  * boot instance on ec2, upgrade grub-pc. The user will be prompted as to if they want to continue without installing grub even though grub-pc is of no use on EC2.
  There is *no* potential for regression on running systems, only on systems where a user chooses to install grub-legacy-ec2 *and* modifies their instance to use pv-grub.
--
[1] https://code.launchpad.net/~smoser/ubuntu/lucid/cloud-init/lucid-kernel-upgrades
[2] http://bazaar.launchpad.net/~smoser/ubuntu/lucid/cloud-init/lucid-kernel-upgrades/revision/20?remember=19&compare_revid=19
=====

Scott Moser (smoser) wrote :

This is not truely a regression, but rather a fix (to bug 683379) that won't get put in.

tags: added: ec2-images regression-proposed uec-images
Changed in cloud-init (Ubuntu):
importance: Undecided → Low
status: New → Fix Released
Changed in cloud-init (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → High
Scott Moser (smoser) on 2010-12-01
description: updated

Accepted cloud-init into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in cloud-init (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed
Scott Moser (smoser) wrote :

I just verified this on
ap-southeast-1 ami-ce601e9c canonical ubuntu-lucid-daily-i386-server-20101203.1

That build was built with -proposed enabled.

$ dpkg-query --show cloud-init grub-legacy-ec2
cloud-init 0.5.10-0ubuntu1.5
grub-legacy-ec2 0.5.10-0ubuntu1.5

$ debconf-get-selections 2>/dev/null | grep grub-pc/install
grub-pc grub-pc/install_devices_failed boolean false
grub-pc grub-pc/install_devices string
grub-pc grub-pc/install_devices_disks_changed multiselect
grub-pc grub-pc/install_devices_empty boolean true

Scott Moser (smoser) on 2010-12-06
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.5.10-0ubuntu1.5

---------------
cloud-init (0.5.10-0ubuntu1.5) lucid-proposed; urgency=low

  * make grub-config code run on instance first boot so user is not
    prompted on grub upgrade (LP: #683890, LP: #683379)

cloud-init (0.5.10-0ubuntu1.4) lucid-proposed; urgency=low

  * add grub-legacy-ec2 to support utilizing pv-grub
   rebooting into new kernels (LP: #671103)
 -- Scott Moser <email address hidden> Thu, 02 Dec 2010 09:42:17 -0500

Changed in cloud-init (Ubuntu Lucid):
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