Issue #14036 has been updated by Tim Mooney.
I'm seeing the exact same thing Richard is.
err: /Stage[main]/Statsd::Service/Service[statsd]: Could not evaluate:
Could not find init script for 'statsd'
Note that prior to 2.7.14, we were applying a very minor patch to
provider/service/upstart.rb, so that :redhat was also a valid option for
upstart:
Index: puppet-2.7.9/lib/puppet/provider/service/upstart.rb
===================================================================
--- puppet-2.7.9.orig/lib/puppet/provider/service/upstart.rb
+++ puppet-2.7.9/lib/puppet/provider/service/upstart.rb
@@ -5,7 +5,7 @@ Puppet::Type.type(:service).provide :ups
on Ubuntu. For `upstart` documentation, see <http://upstart.ubuntu.com/>.
"
# confine to :ubuntu for now because I haven't tested on other platforms
- confine :operatingsystem => :ubuntu #[:ubuntu, :fedora, :debian]
+ confine :operatingsystem => [:ubuntu,:redhat,:centos]
commands :start => "/sbin/start",
:stop => "/sbin/stop",
With 2.7.14, that's no longer enough because of the new tests for is_upstart?.
RHEL 6.x uses upstart, but it does not include /lib/init (or /lib64/init).
It does have the directory /etc/init/ and the *.conf files in that directory
control the upstart services. It also does have /sbin/initctl and all the
symlinks in /sbin that service/upstart.rb is expecting.
----------------------------------------
Bug #14036: Allow puppet to handle upstart better
https://projects.puppetlabs.com/issues/14036#change-63207
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.