Issue #9192 has been updated by Clay Caviness.
Nigel Kersten wrote:
> Clay, any chance of running a version without ruby --debug? I'm having
> trouble identifying the puppet level issues quickly with all the ruby debug
> noise.
I'll attach that if you still need it, but I seem to have sorted the issue. I
tweaked provider.rb to print the whole property hash:
260 def name
261 require 'pp'
262 PP::pp(@property_hash)
263 if n = @property_hash[:name]
264 return n
265 elsif self.resource
266 resource.name
267 else
268 raise Puppet::DevError, "No resource and no name in property hash
in #{self.clas s.name} instance"
269 end
270 end
... and noticed:
{:provider=>:launchd,
:path=>"/System/Library/LaunchDaemons/com.apple.xprotectupdater.plist",
:status=>:stopped,
:name=>nil}
Examining the launchd plist, it's malformed (well, incomplete):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyLi
st-1.0.dtd">
<plist version="1.0">
<dict>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>
This showed up when we were tweaking the StartInterval for xprotect, but forgot
to restrict the setting to 10.6 and later, so some 10.5 machines got this.
I think provider.rb should probably just skip malformed/oddball launchd plists
like this rather than completely bailing out.
----------------------------------------
Bug #9192: service (launchd) provider fails on OS X 10.7 (Lion)
https://projects.puppetlabs.com/issues/9192
Author: Clay Caviness
Status: Code Insufficient
Priority: Normal
Assignee: Gary Larizza
Category: OSX
Target version: 2.7.x
Affected Puppet version:
Keywords: lion
Branch:
https://github.com/glarizza/puppet-1/tree/feature/2.7.x/launchd_optimization
$ sudo puppet apply --debug
service { 'com.company.corp.somejob': ensure => running, enable => true, }
[...]
debug: Puppet::Type::Service::ProviderLaunchd: Executing '/usr/bin/plutil
-convert xml1 -o /dev/stdout
/Library/LaunchDaemons/com.company.corp.somejob.plist'
debug: Service[com.company.corp.somejob](provider=launchd): Executing
'launchctl load /Library/LaunchDaemons/com.company.corp.somejob.plist'
err: /Stage[main]//Service[com.company.corp.somejob]/ensure: change from
stopped to running failed: Unable to start service: com.company.corp.somejob at
path: /Library/LaunchDaemons/com.company.corp.somejob.plist
debug: Finishing transaction 2277069800
debug: Storing state
debug: Stored state in 0.13 seconds
notice: Finished catalog run in 1.27 seconds
Yet another instance where there an OS X version check. Lines 214, 239, and 254
of launchd.rb
(http://projects.puppetlabs.com/projects/puppet/repository/revisions/master/entry/lib/puppet/provider/service/launchd.rb):
if self.class.get_macosx_version_major == "10.6"
10.7 _also_ uses the launchd overrides plist.
I'm using Mac OS X 10.7.1, Puppet 2.7.3.
--
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.