Issue #14036 has been updated by Richard Crowley.
Status changed from Closed to Re-opened
Target version changed from 2.7.14 to 2.7.15
This patch definitely seems to have broken `service` resources which explicitly
declare `provider => "upstart"` and don't have the `/lib/init/upstart-job`
symlink. I get
Could not evaluate: Could not find init script for '...'
errors for all my Upstart services which work fine with 2.7.13. They're all
declared
service { "...":
ensure => running,
hasstatus => true,
provider => "upstart",
}
----------------------------------------
Bug #14036: Allow puppet to handle upstart better
https://projects.puppetlabs.com/issues/14036#change-62149
Author: Matthaus Litteken
Status: Re-opened
Priority: Normal
Assignee: Jeff Weiss
Category:
Target version: 2.7.15
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.