← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1336855] Re: [SRU] non-interactive grub updates broken for /dev/xvda devices on Cloud-Images/Cloud-init

 

fixed in 0.7.6

** Also affects: cloud-init
   Importance: Undecided
       Status: New

** Changed in: cloud-init
   Importance: Undecided => Medium

** Changed in: cloud-init
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1336855

Title:
  [SRU] non-interactive grub updates broken for /dev/xvda devices on
  Cloud-Images/Cloud-init

Status in Init scripts for use on cloud images:
  Fix Released
Status in “cloud-init” package in Ubuntu:
  Fix Released
Status in “cloud-init” source package in Precise:
  Fix Committed
Status in “cloud-init” source package in Trusty:
  Fix Committed
Status in “cloud-init” source package in Utopic:
  Fix Released

Bug description:
  [SRU JUSTIFICATION]

  [IMPACT] Cloud-init, as part of the first boot configures grub-pc to
  set the device that grub should install to. However, in the case of
  HVM instances, /dev/xvda and /dev/xvda1 are not considered (only sda,
  sda1, vda and vda1). Since AWS HVM instances and Xen use /dev/xvdX
  devices, this means that any Grub update with an ABI change will break
  the instances, rendering them unable to boot.

  [FIX] Cloud-init has been patched to understand /dev/xvda devices and
  set the correct grub-pc/install_device. Further, cloud-init's postinst
  has been patched to fix people who might be affected by this bug.

  [Test Case 1]
  1. Boot HVM instance store AMI ami-90b156f8 (us-east-1)
  2. Update grub
  3. Update cloud-init from -proposed
  4. Reboot instance
  5. instance should come back up

  [Test Case 2 -- 12.04 Only]
  1. Boot HVM instance store AMI ami-90b156f8 (us-east-1)
  2. run "cloud-init-cfg grub_dpkg  --freqenucy always"
  3. run "debconf-show grub-pc", confirm that  grub-pc/install_devices is /dev/xvda
  4. update grub
  5. Reboot
  6. instance should come back up

  [Test Case 3 -- 14.04 Only]
  1. Boot HVM instance store AMI ami-1f958c76 (us-east-1)
  2. run "cloud-init single grub_dpkg  --freqenucy always"
  3. run "debconf-show grub-pc", confirm that  grub-pc/install_devices is /dev/xvda
  4. update grub
  5. Reboot
  6. instance should come back up

  [Test Case 4]
  1. Install from -proposed
  2. Simulate a first-run:
     echo "grub-pc grub-pc/install_devices select /dev/sda" | debconf-set-selections
  3. Run: cloud-init single --name=grub-dpkg --frequency=always
  4. Run: debconf-show grub-pc
  5. confirm that /dev/xvda is shown as the install device

  
  ----ORIGINAL report----

  It looks like a recent update to grub or the kernel on 12.04 is breaking
  unattended installs on EC2 for HVM instances.

  You can reproduce the problem by doing the following:

  region: us-east-1
  virtualization type: HVM (e.g. r3.xlarge)
  AMI ID: ami-7a916212

  dpkg --configure –a
  apt-get update
  apt-get install -y ruby ruby-dev libicu-dev libssl-dev libxslt-dev
  libxml2-dev monit
  apt-get dist-upgrade –y

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1336855/+subscriptions