Comment 19 for bug 582667

Revision history for this message
Scott Moser (smoser) wrote :

I've verified the update is functioning as it should. Here is how:

- booted ami-1eea0077 (us-east-1 ubuntu-lucid-daily-i386-server-20100817)
  with the following user data:
#cloud-config
debconf_selections: |
  debconf debconf/priority select low
  debconf debconf/frontend select readline
apt_update: true
apt_upgrade: true

sm_misc:
 - &user_setup |
   set -x; exec > ~/user_setup.log 2>&1
   echo "starting at $(date -R)"
   echo "ps grep apt"
   ps axw | grep apt
   echo "ps grep cloud-init-cfg"
   ps axw | grep cloud-init-cfg

runcmd:
 - [ sudo, -Hu, ubuntu, sh, -c, 'read up sleep < /proc/uptime; echo $(date): runcmd up at $up | tee -a ~/runcmd.log' ]
 - [ sudo, -Hu, ubuntu, sh, -c, *user_setup ]
### end user data ###

- on initial boot, the instance has old cloud-init from lucid,
  so old debconf values will be in place.
$ sudo apt-get install debconf-utils
$ sudo debconf-get-selections | grep debconf/
debconf debconf/frontend select Dialog
debconf debconf/priority select high

- save off old logs
  $ mkdir old-logs && mv *.log old-logs

- add proposed and get cloud-init
  $ echo deb http://us.archive.ubuntu.com/ubuntu/ \
     $(lsb_release -sc)-proposed restricted main multiverse universe |
     sudo tee -a /etc/apt/sources.list.d/proposed.list
  $ sudo apt-get install cloud-init
  $ dpkg-query --show cloud-init
  cloud-init 0.5.10-0ubuntu1.2

- remove /var/lib/cloud so cloud-init will run again on next boot
  $ sudo rm -Rf /var/lib/cloud
  $ sudo reboot

- come back to instance, this time
  * debconf set selelections will have taken affect ( bug 582667 is fixed)
    $ sudo debconf-get-selections | grep debconf/
    debconf debconf/frontend select readline
    debconf debconf/priority select low

  * the logs will not show apt or cloud-init-cfg processes ( bug 613309 is fixed) because
    the scripts will have run after those have finished (even though 'apt-get
    upgrade' will have pulled all the -proposed changes)

    the second time, runcmd.log showed it was running at 92.46 seconds of
    uptime, compared to 12.63 the first time. The second time neither 'ps'
    finds cloud-init-cfg processes or apt processes.