Issue #14036 has been updated by Moses Mendoza. Status changed from Merged - Pending Release to Closed
released in 2.7.14rc3 ---------------------------------------- Bug #14036: Allow puppet to handle upstart better https://projects.puppetlabs.com/issues/14036#change-61339 Author: Matthaus Litteken Status: Closed Priority: Normal Assignee: Jeff Weiss Category: Target version: 2.7.14 Affected Puppet version: Keywords: Branch: https://github.com/puppetlabs/puppet/pull/681 Ubuntu patches their puppet with the following patch (included below and as http://paste.ubuntu.com/891624/). It would be awesome to know if this patch is sound enough to be used against our puppet. If so I'm happy to put a pull in with it. Mostly I would like to know if it is sound enough to patch PE with for the upcoming Precise release. --- puppet-2.7.11.orig/lib/puppet/provider/service/init.rb +++ puppet-2.7.11/lib/puppet/provider/service/init.rb @@ -129,7 +129,15 @@ Puppet::Type.type(:service).provide :ini # we just return that; otherwise, we return false, which causes it to # fallback to other mechanisms. def statuscmd - (@resource[:hasstatus] == :true) && [initscript, :status] + if @resource[:hasstatus] == :true then + # Workaround the fact that initctl status command doesn't return + # proper exit codes. Can be removed once LP: #552786 is fixed. + if File.symlink?(initscript) && File.readlink(initscript) == "/lib/init/upstart-job" then + ['sh', '-c', "LANG=C invoke-rc.d #{File::basename(initscript)} status | grep -q '^#{File::basename(initscript)}.*running'" ] + else + [initscript, :status ] + end + end end end --- /dev/null -- 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.
