Add systemd support

Bug #861943 reported by Garrett Holmstrom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Scott Moser

Bug Description

Cloud-init is currently very upstart-specific. Adding support for systemd would help make it work on Fedora.

Related branches

Scott Moser (smoser)
Changed in cloud-init:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Scott Moser (smoser) wrote :

Garret, I pulled your systemd files from Fedora under revno 465.
If there is other work to do, let me know.

Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
status: Triaged → Fix Committed
Revision history for this message
Kevin Brackney (kbrackney) wrote :

Installed Packages
Name : cloud-init
Arch : noarch
Version : 0.6.2
Release : 0.7.bzr457.fc16

Under Fedora 16, the systemd resource cloud-config.target is defined as requiring both cloud-init-local.service and cloud-init.service. If no local datastore is defined (as possibly in an EC2 deployment), the cloud-init-local.service exits with a non-zero return code causing a cascade of failures related to dependent services:

Feb 15 18:47:09 domU-12-31-39-00-85-B2 [CLOUDINIT] cloud-init[INFO]: cloud-init start-local running: Wed, 15 Feb 2012 23:47:09 +0000. up 9.73 seconds
Feb 15 18:47:09 domU-12-31-39-00-85-B2 [CLOUDINIT] __init__.py[DEBUG]: searching for data source in ['DataSourceNoCloud', 'DataSourceOVF']
Feb 15 18:47:09 domU-12-31-39-00-85-B2 [CLOUDINIT] __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceNoCloud', 'DataSourceOVF']

Feb 15 18:47:09 domU-12-31-39-00-85-B2 systemd[1]: cloud-init-local.service: main process exited, code=exited, status=1
Feb 15 18:47:09 domU-12-31-39-00-85-B2 systemd[1]: Job cloud-final.service/start failed with result 'dependency'.
Feb 15 18:47:09 domU-12-31-39-00-85-B2 systemd[1]: Job cloud-config.service/start failed with result 'dependency'.
Feb 15 18:47:09 domU-12-31-39-00-85-B2 systemd[1]: Job cloud-config.target/start failed with result 'dependency'.
Feb 15 18:47:09 domU-12-31-39-00-85-B2 systemd[1]: Unit cloud-init-local.service entered failed state.

cloud-init-local.service - Initial cloud-init job (pre-networking)
          Loaded: loaded (/lib/systemd/system/cloud-init-local.service; enabled)
          Active: failed since Wed, 15 Feb 2012 18:57:58 -0500; 1h 8min ago
         Process: 374 ExecStart=/usr/bin/cloud-init start-local (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/cloud-init-local.service

Suggest changing the /lib/systemd/system/cloud-config.target definition to remove the mandatory requirement on cloud-init-local.service and make it optional. This should then allow the instance to be configured appropriately from the cloud-providers metadata/userdata resource as the remaining services will be allowed to run.

Revision history for this message
Garrett Holmstrom (gholms) wrote :

Good catch, Kevin. cloud-init shouldn't be failing when no data source exists. That is fixed in bzr rev. 524.

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.