cloud-run-user-script.conf upstart script needs to run after all other cloud-init processes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Fix Released
|
High
|
Unassigned |
Bug Description
Binary package hint: cloud-init
All lucid/maverick source packages,
The following upstart scripts need to wait for the 'cloud-config' status in addition to what they currently wait for, otherwise userdata might not be loaded yet.
cloud-apt-
cloud-config-
cloud-config-
cloud-config-
cloud-disable-
cloud-ec2-
cloud-raid.conf
cloud-runurl.conf
~~
most of these need to just add 'and cloud-config' but one or two need to just 'start on cloud-config'
~~~
cloud-run-
needs 'start on (stopped rc RUNLEVEL=[2345] and stopped cloud-config-misc)'
We need this package to work in ec2 as well as UEC otherwise it make provisioning of a new instance much harder and defeats the purpose of this package. Since Lucid is LTS I would like to see a SRU for this issue as well since it prevent out of the box/repo use of this feature.
==== Begin SRU Justification ====
Impact: The impact of this bug is that a popular portion of "cloud-config" syntax [1] is not easily used in the 10.04 images. If the user specifies commands to run, they cannot rely on other portions of cloud-init having finished before those scripts run. The big examples is that if the user installs a package via 'pkgs', they cannot rely on it being present in their 'runcmd'. The ordering is simply not guaranteed.
Solution: The solution is to make the upstart script that executes the user's commands depend on 'stopped' of each of the other upstart jobs. In this manner, it will not execute until the other jobs are finished.
Patch: Available in branch attached to this bug [2]
Regression Potential: There should be low potential for regression and low realistic change of user expectations. Previously, the order was non-deterministic, this will guarantee that jobs run after packages are installed.
TEST Case:
* launch ec2 instance (ubuntu-
| #cloud-config
| packages: [ bzr, ubuntu-dev-tools, ccache, vim-nox, git-core, lftp ]
| runcmd:
| - [ sudo, -Hu, ubuntu, sh, -c 'bzr branch lp:ubuntu/lucid-proposed/cloud-init 2>&1 | tee cmd.log' ]
* without a fix for this bug, the ordering is indeterminable, but most likely, the 'bzr branch' command will run before bzr is installed. With the fix, it is guaranteed to run afterwards.
--
[1] http://
[2] http://
==== End SRU Justification =====
description: | updated |
tags: | added: patch |
description: | updated |
Changed in cloud-init (Ubuntu Lucid): | |
importance: | Undecided → High |
milestone: | none → lucid-updates |
status: | New → In Progress |
I subscribed the server team. Once this is reviewed and fixed in maverick, we can discuss an SRU. Please subscribe ubuntu-sru then. Thank you!