Issue #15929 has been updated by Gary Larizza. Status changed from Accepted to In Topic Branch Pending Review Branch set to https://github.com/puppetlabs/puppet/pull/1309
Amended a pull request and added this case under the umbrella of "handling malformed plist files". Awaiting review and hopefully a merge! Thanks for the code Clay! ---------------------------------------- Bug #15929: launchd service provider can't handle malformed plists https://projects.puppetlabs.com/issues/15929#change-78038 Author: Clay Caviness Status: In Topic Branch Pending Review Priority: Normal Assignee: Gary Larizza Category: OSX Target version: Affected Puppet version: 2.7.12 Keywords: Branch: https://github.com/puppetlabs/puppet/pull/1309 If there's a zero-length or other un-parseable plist in the {/System}/Library/Launch{Daemons,Agents}/ directories, the launcd service provider gives up. <pre> $ sudo touch /Library/LaunchDaemons/foo $ sudo puppet resource service Could not run: Execution of '/usr/bin/plutil -convert xml1 -o /dev/stdout /Library/LaunchDaemons/foo' returned 1: /Library/LaunchDaemons/foo: Property List error: Cannot parse a NULL or zero-length data / JSON error: No value. </pre> There is a non-zero chance a zero-length file can show up if a puppet run is interrupted, leaving a file named something like `/Library/LaunchDaemons/com.company.foo.plist.puppettmp_2620`; after this tmp file is left, all further puppet runs will fail. I think the provider should warn on parse/convert errors, but still continue on with those services it's able to read. -- 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.
