update-grub-legacy-ec2 should detect -aws kernels as appropriate for EC2

Bug #1655934 reported by Dan Watkins
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
Medium
Dan Watkins
Trusty
Fix Released
Medium
Dan Watkins
Xenial
Fix Released
Medium
Dan Watkins
Yakkety
Fix Released
Medium
Unassigned
Zesty
Fix Released
Medium
Dan Watkins

Bug Description

[Impact]
PV images built with AWS custom kernels currently won't boot because their kernels aren't detected.

[Test Case]
* Launch an HVM instance
* Run update-grub-legacy-ec2 and see an error message like "Ignoring non-Xen Kernel on Xen domU host: vmlinuz-4.4.0-1001-aws"
* Install the new package
* Run update-grub-legacy-ec2 again and see success like:
Found kernel: /boot/vmlinuz-4.4.0-1001-aws
Found kernel: /boot/vmlinuz-4.4.0-1001-aws
Updating /boot/grub/menu.lst ... done

[Regression Potential]
This is a single line change to a case statement; regression potential is minimal.

[Original Report]
Currently, it will detect -ec2 kernels, but we also need it to detect -aws kernels.

Related bugs:
 * bug 1379080: update-grub-legacy-ec2 fails to detect xen kernel

Dan Watkins (oddbloke)
description: updated
Changed in cloud-init (Ubuntu):
assignee: nobody → Dan Watkins (daniel-thewatkins)
Changed in cloud-init (Ubuntu Xenial):
assignee: nobody → Dan Watkins (daniel-thewatkins)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.9-0ubuntu2

---------------
cloud-init (0.7.9-0ubuntu2) zesty; urgency=medium

  * debian/update-grub-legacy-ec2:
    - Correctly detect kernels ending in -aws as kernels that can boot on EC2
      (LP: #1655934)

 -- Daniel Watkins <email address hidden> Thu, 12 Jan 2017 11:34:23 +0000

Changed in cloud-init (Ubuntu):
status: New → Fix Released
Steve Langasek (vorlon)
Changed in cloud-init (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.8-49-g9e904bb-0ubuntu1~16.04.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Dan Watkins (oddbloke)
Changed in cloud-init (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dan Watkins (oddbloke) wrote :

$ sudo update-grub-legacy-ec2
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.4.0-1001-aws
Found kernel: /boot/vmlinuz-4.4.0-1001-aws
Updating /boot/grub/menu.lst ... done

tags: added: verification-done
removed: verification-needed
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.8-49-g9e904bb-0ubuntu1~16.04.4

---------------
cloud-init (0.7.8-49-g9e904bb-0ubuntu1~16.04.4) xenial; urgency=medium

  * debian/update-grub-legacy-ec2:
    - Correctly detect kernels ending in -aws as kernels that can boot on EC2
      (LP: #1655934)

 -- Daniel Watkins <email address hidden> Thu, 12 Jan 2017 11:56:03 +0000

Changed in cloud-init (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
status: Fix Released → Fix Committed
Changed in cloud-init (Ubuntu Yakkety):
status: New → Confirmed
Scott Moser (smoser)
description: updated
no longer affects: cloud-init (Ubuntu Trusty)
Scott Moser (smoser)
Changed in cloud-init (Ubuntu Xenial):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Yakkety):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Zesty):
importance: Undecided → Medium
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Dan, or anyone else affected,

Accepted cloud-init into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-0ubuntu1~16.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Yakkety):
status: Confirmed → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Scott Moser (smoser) wrote :

## launched a yakkety instance
$ cat /etc/cloud/build.info
build_name: server
serial: 20170207

$ lsb_release -sc
yakkety

## Enable proposed
$ rel=$(lsb_release -sc)
$ line=$(awk '$1 == "deb" && $2 ~ /ubuntu.com/ {
    printf("%s %s %s-proposed main universe\n", $1, $2, rel); exit(0) };
    ' "rel=$rel" /etc/apt/sources.list)
$ echo "$line" | sudo tee /etc/apt/sources.list.d/proposed.list
deb http://nova.clouds.archive.ubuntu.com/ubuntu/ yakkety-proposed main universe

$ sudo apt-get update -qy
$ sudo apt-get install -qy grub-legacy-ec2

$ dpkg-query show grub-legacy-ec2
grub-legacy-ec2 0.7.9-0ubuntu1~16.10.1

## copy -generic to -aws to simulate a '-aws' kernel being installed.
$ sudo sh -c 'for i in /boot/*-generic; do n=${i%-generic}-ec2; mv -v $i $n; done'
'/boot/System.map-4.8.0-37-generic' -> '/boot/System.map-4.8.0-37-ec2'
'/boot/abi-4.8.0-37-generic' -> '/boot/abi-4.8.0-37-ec2'
'/boot/config-4.8.0-37-generic' -> '/boot/config-4.8.0-37-ec2'
'/boot/initrd.img-4.8.0-37-generic' -> '/boot/initrd.img-4.8.0-37-ec2'
'/boot/vmlinuz-4.8.0-37-generic' -> '/boot/vmlinuz-4.8.0-37-ec2'

## run update-legacy-grub-ec2
## Note that we see the '-aws' kernels, before this change they
## wouldn't be considered (the.
$ sudo update-grub-legacy-ec2
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.8.0-37-generic
Replacing config file /run/grub/menu.lst with new version
Found kernel: /boot/vmlinuz-4.8.0-37-generic
Found kernel: /boot/vmlinuz-4.8.0-37-aws
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

Scott Moser (smoser)
tags: added: verification-done-xenial verification-done-yakkety
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.9-0ubuntu1~16.10.1

---------------
cloud-init (0.7.9-0ubuntu1~16.10.1) yakkety; urgency=medium

  * debian/copyright: update License field to include Apache-2.0
  * debian/update-grub-legacy-ec2: fix to include kernels whose config
    has CONFIG_XEN=y (LP: #1379080).
  * debian/update-grub-legacy-ec2: detect kernels ending in -aws as
    ec2 bootable (LP: #1655934).
  * New upstream release.
    - doc: adjust headers in tests documentation for consistency.
    - pep8: fix issue found in zesty build with pycodestyle.
    - integration test: initial commit of integration test framework
      [Wesley Wiedenmeier]
    - LICENSE: Allow dual licensing GPL-3 or Apache 2.0 [Jon Grimm]
    - Fix config order of precedence, putting kernel command line over system.
      [Wesley Wiedenmeier] (LP: #1582323)
    - pep8: whitespace fix
    - Update the list of valid ssh keys. [Michael Felt]
    - network: add ENI unit test for statically rendered routes.
    - set_hostname: avoid erroneously appending domain to fqdn
      [Lars Kellogg-Stedman] (LP: #1647910)
    - doc: change 'nobootwait' to 'nofail' in docs [Anhad Jai Singh]
    - Replace an expired bit.ly link in code comment. [Joshua Harlow]

 -- Scott Moser <email address hidden> Tue, 31 Jan 2017 21:02:28 -0500

Changed in cloud-init (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Scott Moser (smoser)
Changed in cloud-init (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

This problem occurs when trying to install "other named" kernels on trusty too.

Changed in cloud-init (Ubuntu Trusty):
importance: Undecided → Medium
assignee: nobody → Dan Watkins (daniel-thewatkins)
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

I'd like to revisit the way this was fixed in {X,Y,Z} and will need to be fixed in T -- which was to add "-aws" to update-grub-legacy-ec2's whitelist of bootable kernel package names.

We'd like to be able to construct additional EC2-target kernel flavors with other (arbitrary) names, without having to keep updating this whitelist in update-grub-legacy-ec2.

As has been pointed out in bug 1379080, the value of check is debatable anyway. ("... it is perfectly safe to run a Xen-capable kernel on non-Xen hosts ... Recommendation: Update detection logic to search for CONFIG_XEN=y in the kernel config, and remove version string detection.")

I second that proposal, that we eliminate the version string check altogether.

Revision history for this message
Robie Basak (racb) wrote :

Hello Dan, or anyone else affected,

Accepted cloud-init into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.5-0ubuntu1.22 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

I have verified that cloud-init (0.7.5-0ubuntu1.22) in trusty -proposed does fix the problem.

tags: added: verification-done-trusty
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.22

---------------
cloud-init (0.7.5-0ubuntu1.22) trusty; urgency=medium

  * debian/update-grub-legacy-ec2:
    - Correctly detect kernels ending in -aws as kernels that can boot on EC2
      (LP: #1655934)
    - Consider kernels with CONFIG_XEN=y bootable on aws. (LP: #1379080)

 -- Scott Moser <email address hidden> Thu, 08 Jun 2017 19:25:41 -0400

Changed in cloud-init (Ubuntu Trusty):
status: Fix Committed → 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.