Bug 1008250

Summary: Cloud-init no longer automatically starts puppet
Product: [Fedora] Fedora Reporter: Robert Brown <rjb>
Component: cloud-initAssignee: Garrett Holmstrom <gholms>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: apevec, gholms, Jan.van.Eldik, mattdm, p, rjb, shardy
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cloud-init-0.7.2-10.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-17 04:30:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Revised Fedora-specific patch file
none
Working patch for starting and enabling none

Description Robert Brown 2013-09-15 23:40:27 UTC
Description of problem:
The puppet package in Fedora 19 changed to use systemd, and as part of that change it now uses "puppetagent.service" to start. In Fedora 18, it used /etc/init.d/puppet to start.

The cloud-init package distributed with Fedora 19 does not account for this change and still tries to use "systemctl start puppet.service" which no longer works. This can be seen in the file /usr/lib/python2.7/site-packages/cloudinit/config/cc_puppet.py.

This causes cloud-init to not automatically start puppet to not be started on Fedora 19.


Version-Release number of selected component (if applicable):
Latest

How reproducible:
Every time

Steps to Reproduce:
1. Try to use cloud-init to start puppet.

Actual results:
Does not start puppet

Expected results:
Starts puppet

Additional info:
This should be a very easy change, just modify cc_puppet.py to use "puppetagent.service" instead of "puppet.service".

Comment 1 Robert Brown 2013-09-15 23:49:11 UTC
Created attachment 798072 [details]
Revised Fedora-specific patch file

This should fix it. This is a drop-in replacement for the existing patch file from the SRPM.

Comment 2 Robert Brown 2013-09-17 06:29:30 UTC
Created attachment 798618 [details]
Working patch for starting and enabling

The original patch fixed enabling the service but it still would not start. This patch also changes the startup command to use "puppetagent" which should now work to start puppet.

Comment 3 Robert Brown 2013-09-18 05:28:46 UTC
I can confirm the 2nd patch is working and tested, both to enable and start puppet. I rolled a new SRPM/RPM with it and I'm off and running.

Comment 4 Fedora Update System 2013-09-25 02:41:31 UTC
cloud-init-0.7.2-6.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/cloud-init-0.7.2-6.fc20

Comment 5 Fedora Update System 2013-09-25 02:42:50 UTC
cloud-init-0.7.2-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/cloud-init-0.7.2-6.fc19

Comment 6 Fedora Update System 2013-09-27 00:44:20 UTC
Package cloud-init-0.7.2-7.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cloud-init-0.7.2-7.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17724/cloud-init-0.7.2-7.fc19
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-09-27 01:19:49 UTC
cloud-init-0.7.2-7.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/cloud-init-0.7.2-7.fc18

Comment 8 Fedora Update System 2013-10-15 06:28:31 UTC
cloud-init-0.7.2-7.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2013-10-18 19:46:08 UTC
cloud-init-0.7.2-7.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2013-10-18 19:54:24 UTC
cloud-init-0.7.2-7.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Robert Brown 2014-02-13 18:58:57 UTC
This is now broken again, at least in Fedora 19.

A later update to the puppet package reverted to using puppet.service instead of puppetagent.service. While there is still a symbolic link to puppetagent.service in the /usr/lib/systemd/system directory, systemctl will not operate on it.

# systemctl enable puppetagent.service
Failed to issue method call: No such file or directory

... while this works:

# systemctl enable puppet.service
ln -s '/usr/lib/systemd/system/puppet.service' '/etc/systemd/system/multi-user.target.wants/puppet.service'

Back to cloud-init, the original fix for this issue changed /usr/lib/python2.7/site-packages/cloudinit/config/cc_puppet.py to using puppetagent.service, so that should be backed out and changed to puppet.service.

Otherwise cloud-init can not start the puppet service.

Comment 12 Robert Brown 2014-04-30 07:17:46 UTC
FYI, I can confirm this is still a problem in Fedora 20 as well as with the rawhide package cloud-init-0.7.2-8.fc21.src.rpm.

Solution is the same - get rid of the puppetagent.service call in favor of puppet.service.

Comment 13 Robert Brown 2014-04-30 07:20:40 UTC
While we are at it, in Fedora 20 the location of the i18n file moved. In the cloud-init-fedora.cfg file it is specified as /etc/sysconfig/i18n, which is no longer correct. The new location in Fedora 20 is /etc/locale.conf.

Comment 14 Fedora Update System 2014-06-09 20:30:30 UTC
cloud-init-0.7.2-10.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/cloud-init-0.7.2-10.fc20

Comment 15 Fedora Update System 2014-06-09 20:32:18 UTC
cloud-init-0.7.2-10.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/cloud-init-0.7.2-10.fc19

Comment 16 Fedora Update System 2014-06-11 16:24:25 UTC
Package cloud-init-0.7.2-10.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing cloud-init-0.7.2-10.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7238/cloud-init-0.7.2-10.fc19
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2014-07-17 04:28:24 UTC
cloud-init-0.7.2-10.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2014-07-17 04:30:53 UTC
cloud-init-0.7.2-10.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.