Issue #14811 has been updated by Adam Roben.

I've run into this on Puppet 3.1 as well. It pretty much guarantees that the 
first run of Puppet on any of my machines will fail.

----------------------------------------
Bug #14811: launchd service provider doesn't keep up-to-date with on-disk files
https://projects.puppetlabs.com/issues/14811#change-87232

* Author: Clay Caviness
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: OSX
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
When adding a new launchd job, if the manifests have other service resources, 
the service provider will frequently be out-of-date and be unable to 
start/enable a service from a newly-created launchd plist file.

Looking at debug output, it seems that the first time puppet comes across a 
service resource, it reads all the _current_ on-disk launchd plist files. Later 
in the manifest, if you add a new launchd plist file and a new service based on 
that, the new service will fail to start:

`err: /Stage[main]//Service[com.company.testjob]/ensure: change from absent to 
running failed: Unable to find launchd plist for job: com.company.testjob`

I presume this is because the new service resource isn't re-reading the on-disk 
plists, as a second puppet run with the same manifests enables the new launchd 
job successfully.

As a contrived example to recreate, add part of the output of `sudo puppet 
resource service` to the top of a manifest with:

<pre>
file { '/Library/LaunchDaemons/com.company.testjob.plist':
  ensure  => file,
  source  => 'file:///tmp/testjob/com.company.testjob.plist'
  mode    => 0644,
}
service { 'com.company.com':
  enable    => 'true',
  ensure    => 'running',
  subscribe => File['/Library/LaunchDaemons/com.company.testjob.plist'],
}
</pre>

I'm currently running 2.7.12, but this has been occurring for a long time now 
(since 2.6, probably forever).


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to