cloud-init.py fails when not using upstart

Bug #785551 reported by Garrett Holmstrom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Unassigned

Bug Description

cloud-init.py calls "cloud.initctl_emit()" near its end, presumably to generate an event that triggers other services to run in parallel with cloud_init_modules. This raises an exception when the system doesn't use upstart because /sbin/initctl does not exist.

I suggest moving the portion of cloud-init.py that executes cloud_init_modules into a separate script that runs after the initial cloud-init service. That should make it possible for services to trigger at the same point in the process with the same level of parallelism, while obviating the need to manually generate an event partway through the script and making it easier for non-upstart init systems to use cloud-init.

If splitting the script apart is out of the question, is there any way to skip the call to /sbin/initctl, make it fail more gracefully, or otherwise make things work when upstart is absent?

My apologies if I am failing to realize something...

Related branches

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

This is "fix-commited" in trunk. The initctl call can now be avoided/configured via distribution or runtime configuration.

See the documentation for 'cc_ready_cmd' for how to do that.

example:
 - cc_ready_cmd: [ sh, -c, 'echo HI MOM > /tmp/file' ]

Changed in cloud-init:
status: New → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.