cloud-init 0.6.3 on precise generates invalid apt-get install command line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Dimiter Naydenov | ||
1.24 |
Fix Released
|
High
|
Dimiter Naydenov |
Bug Description
Since the CentOS support landed on 1.24, I observed a regression when adding a precise machine in an environment (not when bootstrapping on precise). Looking at the cloud-init-
E: Command line option --target-release precise-
2015-05-19 15:29:47,184 - cc_apt_
2015-05-19 15:29:47,188 - __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/
raise errors[0]
CalledProcessError: Command '['apt-get', '--option', 'Dpkg::
2015-05-19 15:29:47,188 - __init__.py[ERROR]: config handling of apt-update-upgrade, None, [] failed
2015-05-19 15:29:47,200 - cloud-init-
errors running cloud_config [config]: ['apt-update-
This is caused by rendering user-data YAML with the following in the "packages" section:
packages:
- curl
- cpu-checker
- bridge-utils
- rsyslog-gnutls
- --target-release precise-
- --target-release precise-
- tmux
The problem is that cloud-init 0.6.3 (in precise) encloses each of the packages in the list in single quotes (see above), which leads to an invalid argument like '--target-release precise-
I have already fixed this some time ago (see https:/
The proper fix (still live testing, but looks fine so far) needs to:
1. In cloudconfg/
2. In the same file, but in getCommandsForA
Changed in juju-core: | |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
tags: | added: tech-debt |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
1.23 is not affected, but both 1.24 and 1.25 are.