[SRU] apt_sources broken in 0.6.3-0ubuntu1.3 [regression]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Critical
|
Scott Moser |
Bug Description
[Impact]
cloud-init can no longer process cloud-config that specify a 'packages' value. This affects any tools (Juju, MAAS) that rely on cloud-init to install various packages as part of its first-boot. This seems to trigger when specifying apt_sources in cloud-init.
[Test Case]
Create a userdata file:
cat >>/tmp/ud.txt
#cloud-config
apt_sources:
- {source: 'ppa:openstack-
apt_update: true
apt_upgrade: false
packages: [python-novaclient]
<<END
Boot a precise daily Ubuntu Cloud image, specifying the ud.txt as user-data:
euca-run-instances -k adam -t m1.tiny -f /tmp/ud.txt ami-04d
Allow instance to boot. Since MAAS provisiongs nodes on-the-fly, first boot will have the affected cloud-init version and the attached traceback in /var/log/
For cloud instances, its most likely running an older version of cloud-init and the cloud-config was processed okay on first boot. To test the affected version there, ssh to the machine:
# revert changes to system from initial cloud-init run.
$ sudo dpkg -P python-novaclient ;\
sudo rm -rf /etc/apt/
sudo rm -rf /var/lib/cloud/*
# Install cloud-init from precise-updates
$ sudo apt-get install cloud-init=
# re-run cloud-init
$ sudo cloud-init start-local ; sudo cloud-init start; sudo cloud-init-cfg all config ; sudo cloud-init-cfg all final
Observe traceback ending in "TypeError: add_sources() takes at most 2 arguments (3 given)", the expected package was not reinstalled.
Apply fix to /usr/share/
expected, package is reinstalled.
[Regression Potential]
Minimal, simple one-line.
[Original Report]
Noticed juju deployed services were failing to come up using Juju+MAAS and the newly released cloud-init SRU for 12.04. The node provisioned thru MAAS okay, but after first boot did not have the required agents installed. On further investigation, it looks like the required juju packages were never installed. /var/log/
The key fingerprint is:
b4:83:ef:
The key's randomart image is:
+--[ECDSA 256]---+
| |
| o |
| . . o |
| o .o . |
|. . S. o |
| + ....o |
|o.+. . ..o |
|.oo.oE ..o |
| .o.. o= |
+-----------------+
Generating locales...
en_US.UTF-8... up-to-date
Generation complete.
2013-01-16 16:32:56,919 - __init_
File "/usr/lib/
cc.handle(name, run_args, freq=freq)
File "/usr/lib/
[name, self.cfg, self.cloud, cloudinit.log, args])
File "/usr/lib/
func(*args)
File "/usr/lib/
errors = add_sources(cloud, cfg['apt_sources'], params)
TypeError: add_sources() takes at most 2 arguments (3 given)
2013-01-16 16:32:56,919 - __init__.py[ERROR]: config handling of apt-update-upgrade, None, [] failed
2013-01-16 16:32:56,998 - cloud-init-
errors running cloud_config [config]: ['apt-update-
Attached are /var/log/
Changed in cloud-init (Ubuntu): | |
assignee: | nobody → Scott Moser (smoser) |
importance: | Undecided → Critical |
status: | New → In Progress |
description: | updated |
summary: |
- cloud-init 0.6.3-0ubuntu1.3 failing to process juju-generated userdata + [SRU] cloud-init 0.6.3-0ubuntu1.3 failing to process juju-generated + userdata |
description: | updated |
summary: |
- [SRU] cloud-init 0.6.3-0ubuntu1.3 failing to process juju-generated - userdata + [SRU] apt_sources broken in 0.6.3-0ubuntu1.3 |
summary: |
- [SRU] apt_sources broken in 0.6.3-0ubuntu1.3 + [SRU] apt_sources broken in 0.6.3-0ubuntu1.3 [regression] |
tags: | added: regression-update |
reproduces with:
#cloud-config
apt_update: True
apt_sources:
- source: "ppa:smoser/ppa"