~ubuntu-on-ec2/vmbuilder/automated-ec2-builds

Viewing all changes in revision 700.

  • Committer: Robert Jennings
  • Date: 2015-08-18 11:32:24 UTC
  • Revision ID: robert.jennings@canonical.com-20150818113224-u0rh4mofywc0n5hr
Workaround: Remove grub menu.lst for ucf registry (LP: #1485685)

Users are still requiring manual intervention for upgrades that
affect grub due to a failure to purge the ucf registry entry.

At the root of this issue is ucf. The ucfr command will store a 
path that contains symlinks during insertion but will only match the 
symlink-resolved path when attempting removal. Cloud image builds modify
grub's menu.lst but have attempted to purge the ufc registry entry. This
bug in ucf causes the registry removal to fail.

This was partially fixed upstream in 3.0028[1] so that future additions 
to the registry would be symlink-resolved as well; however it does 
not address upgrade such that the user still can not remove an entry
containing a symlink.

For our current cloud image users, we can ensure the entry is properly 
removed during image creation for new images, ideally with a fixed ucf 
package that benefits everyone, but for images in the field the user
would need to remove the registry entry[2] and this is a manual edit of
the registry file without further patches to upstream ucf.

For this patch we remove the entry using sed rather than ucfr is
updated from upstream.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724457
[2] sed -i -r "/grub[[:space:]]+\/var\/run\/grub\/menu\.lst/d" \
    /var/lib/ucf/registry

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: