[Bug 1485685] [NEW] Users are prompted on upgrade of cloud images

2015-08-20 Thread Launchpad Bug Tracker
You have been subscribed to a public bug by Robie Basak (racb):

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.

** Affects: cloud-init (Ubuntu)
 Importance: Medium
 Status: Triaged


** Tags: bot-stop-nagging
-- 
Users are prompted on upgrade of cloud images
https://bugs.launchpad.net/bugs/1485685
You received this bug notification because you are a member of Ubuntu Server 
Team, which is subscribed to the bug report.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1485685] [NEW] Users are prompted on upgrade of cloud images

2015-08-18 Thread Launchpad Bug Tracker
You have been subscribed to a public bug:

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.

** Affects: cloud-init (Ubuntu)
 Importance: Undecided
 Assignee: Robert C Jennings (rcj)
 Status: Triaged


** Tags: bot-stop-nagging
-- 
Users are prompted on upgrade of cloud images
https://bugs.launchpad.net/bugs/1485685
You received this bug notification because you are a member of Ubuntu Server 
Team, which is subscribed to cloud-init in Ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1485685] [NEW] Users are prompted on upgrade of cloud images

2015-08-17 Thread Robie Basak
Public bug reported:

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.

** Affects: ubuntu
 Importance: Undecided
 Status: Confirmed


** Tags: bot-stop-nagging

** Tags added: bot-stop-nagging

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1485685

Title:
  Users are prompted on upgrade of cloud images

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1485685/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs