Comment 5 for bug 1244355

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

I've verified this on a recent instance of precise. See below for how.

## launch instance with user-data showing the bug we've sqaushed

$ cat user-data.txt
#cloud-config
apt_sources:
 - source: "cloud-archive:havana"
output: {all: '| tee -a /var/log/cloud-init-output.log'}

## now on the instance

$ cat /etc/apt/sources.list.d/cloud_config_sources.list
cloud-archive:havana

$ echo "deb http://archive.ubuntu.com/ubuntu precise-proposed main" |
  sudo tee /etc/apt/sources.list.d/precise-proposed.list
deb http://archive.ubuntu.com/ubuntu precise-proposed main

$ sudo apt-get update
E: Type 'cloud-archive:havana' is not known on line 1 in source list /etc/apt/sources.list.d/cloud_config_sources.list
E: The list of sources could not be read.

$ sudo rm /etc/apt/sources.list.d/cloud_config_sources.list

$ sudo apt-get update -q
$ sudo apt-cache policy cloud-init
cloud-init:
  Installed: 0.6.3-0ubuntu1.10
  Candidate: 0.6.3-0ubuntu1.11
  Version table:
     0.6.3-0ubuntu1.11 0
        500 http://archive.ubuntu.com/ubuntu/ precise-proposed/main amd64 Packages
 *** 0.6.3-0ubuntu1.10 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.3-0ubuntu1 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
$ sudo apt-get install -qy cloud-init

$ sudo rm -Rf /var/lib/cloud/ /var/log/cloud-init*
$ sudo reboot

## ssh back in, and expect it to have applied our cloud-archive:havana

$ ( cd /etc/apt/sources.list.d && ls -l )
total 12
-rw-r--r-- 1 root root 166 Mar 20 07:02 cloudarchive-havana.list
-rw-r--r-- 1 root root 59 Mar 20 07:02 precise-proposed.list
-rw-r--r-- 1 root root 59 Mar 20 07:01 precise-proposed.list.save

$ cat /etc/apt/sources.list.d/cloudarchive-havana.list
deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main
deb-src http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main

$ sudo apt-get update -q
$ sudo apt-cache policy python-novaclient
python-novaclient:
  Installed: (none)
  Candidate: 1:2.15.0-0ubuntu1~cloud0
  Version table:
     1:2.15.0-0ubuntu1~cloud0 0
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ precise-updates/havana/main amd64 Packages
     2012.1-0ubuntu1 0
        500 http://nova.clouds.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages