Activity log for bug #1485685

Date Who What changed Old value New value Message
2015-08-17 16:49:38 Robie Basak bug added bug
2015-08-17 16:49:48 Robie Basak tags bot-stop-nagging
2015-08-17 16:54:05 Launchpad Janitor ubuntu: status New Confirmed
2015-08-17 21:34:52 Ben Howard ubuntu: assignee Robert C Jennings (rcj)
2015-08-18 08:59:48 Robie Basak description Steps to reproduce (use case): 1. Fire up a Trusty cloud image. 2. Run: sudo apt-get update && sudo apt-get -y dist-upgrade Steps to reproduce (developer): 1. Fire up an older image that does not contain the newest grub2 SRU. Example: http://cloud-images.ubuntu.com/trusty/20150706/trusty-server-cloudimg-amd64-disk1.img. I'm using "uvt-kvm create --backing-image-file trusty-server-cloudimg-amd64-disk1.img testvm" to do this. 2. Run: sudo apt-get update && sudo apt-get -y dist-upgrade Expected results: completes without prompts. Actual results: prompts the user for input to resolve a "manually" changed /boot/grub/menu.lst. User impact: this messes up automation; it is a common use of cloud images for users to automate their server deployments which generally involves running a dist-upgrade and then bootstrapping some kind of configuration management system. This means that we cannot SRU grub2 without breaking some set of users in a fairly common use case of cloud images until users start using newer images with the new SRU'd grub2 rolled in. Workaround: users can use something like: UCF_FORCE_CONFOLD=1 apt-get update && apt-get -y dist-upgrade. Note that to avoid prompts in various other cases users should also set DEBIAN_FRONTEND=noninteractive, run apt-get with -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" and consider redirecting stdin from /dev/null. Investigation: I noticed that running "sudo update-grub-legacy-ec2" before dist-upgrade works around the problem. This is because ucf updates the entry for /run/grub/menu.lst in /var/lib/ucf/hashfile, at which point it doesn't believe that the configurable snippet in menu.lst has changed locally in a future run. I suspect that menu.lst is being changed without ucf being updated in the image build process. Line 421 "_xchroot "${rootd}" /usr/bin/ucfr --purge grub /var/run/grub/menu.lst" in vmbuilder-cloudimg-fixes (r699) looks like it works around the issue, but I don't think the workaround is working because calling "/usr/bin/ucfr --purge grub /var/run/grub/menu.lst" doesn't clear the entry from /var/lib/ucf/registry after the instance is launched either. It seems that ucfr is normalising the path to /run/grub/menu.lst but the registry stores the denormalised path so it fails to match. Steps to reproduce (use case): 1. Fire up a Trusty cloud image. 2. Run: sudo apt-get update && sudo apt-get -y dist-upgrade Steps to reproduce (developer): 1. Fire up an older image that does not contain the newest grub2 SRU. Example: http://cloud-images.ubuntu.com/trusty/20150706/trusty-server-cloudimg-amd64-disk1.img. I'm using "uvt-kvm create --backing-image-file trusty-server-cloudimg-amd64-disk1.img testvm" to do this. 2. Run: sudo apt-get update && sudo apt-get -y dist-upgrade Expected results: completes without prompts. Actual results: prompts the user for input to resolve a "manually" changed /boot/grub/menu.lst. User impact: this messes up automation; it is a common use of cloud images for users to automate their server deployments which generally involves running a dist-upgrade and then bootstrapping some kind of configuration management system. This means that we cannot SRU grub2 without breaking some set of users in a fairly common use case of cloud images until users start using newer images with the new SRU'd grub2 rolled in. Workaround: users can use something like: apt-get update && UCF_FORCE_CONFOLD=1 apt-get -y dist-upgrade. Note that to avoid prompts in various other cases users should also set DEBIAN_FRONTEND=noninteractive, run apt-get with -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" and consider redirecting stdin from /dev/null. Investigation: I noticed that running "sudo update-grub-legacy-ec2" before dist-upgrade works around the problem. This is because ucf updates the entry for /run/grub/menu.lst in /var/lib/ucf/hashfile, at which point it doesn't believe that the configurable snippet in menu.lst has changed locally in a future run. I suspect that menu.lst is being changed without ucf being updated in the image build process. Line 421 "_xchroot "${rootd}" /usr/bin/ucfr --purge grub /var/run/grub/menu.lst" in vmbuilder-cloudimg-fixes (r699) looks like it works around the issue, but I don't think the workaround is working because calling "/usr/bin/ucfr --purge grub /var/run/grub/menu.lst" doesn't clear the entry from /var/lib/ucf/registry after the instance is launched either. It seems that ucfr is normalising the path to /run/grub/menu.lst but the registry stores the denormalised path so it fails to match.
2015-08-18 11:17:40 Robert C Jennings bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724457
2015-08-18 11:49:30 Robert C Jennings ubuntu: status Confirmed Triaged
2015-08-18 11:50:38 Robert C Jennings affects ubuntu cloud-init (Ubuntu)
2015-08-20 14:16:56 Robert C Jennings cloud-init (Ubuntu): importance Undecided Medium
2015-08-20 14:17:06 Robert C Jennings cloud-init (Ubuntu): assignee Robert C Jennings (rcj)
2015-08-20 14:26:51 Robie Basak bug added subscriber Ubuntu Server Team
2016-05-12 13:48:59 Dan Watkins bug task added cloud-images
2016-07-12 17:41:10 Mathew Hodson tags bot-stop-nagging
2017-12-14 21:06:48 Dan Watkins cloud-images: status New Confirmed
2017-12-14 21:06:53 Dan Watkins cloud-images: importance Undecided High
2017-12-14 21:48:59 Dan Watkins cloud-images: status Confirmed In Progress
2017-12-22 15:56:42 Dan Watkins cloud-images: status In Progress Fix Released
2018-02-13 12:49:25 Andy bug added subscriber Andy
2018-02-27 00:44:40 Vernon Lingley bug added subscriber Vernon Lingley
2018-02-27 21:57:12 Scott Moser bug task deleted cloud-init (Ubuntu)
2018-12-05 20:10:39 Ben Bankes bug added subscriber Ben