Issue #11989 has been updated by Keiran S.

I've hit this issue as well, and it reminds me of when SMF arrived in Solaris 
10 (s/arrived/was shoehorned in/).

As I am likely to be on 2.7 for a bit longer, the following logic works for me 
as well.
I had to slightly adjust the service name from Eric's example above.

#
# RHEL 6
#

service { vmware-tools-services :
        ensure     => running,
        hasstatus  => true,
        hasrestart => true,
        start      => '/sbin/initctl start vmware-tools-services',
        stop       => '/sbin/initctl stop vmware-tools-services',
        status     => '/sbin/initctl status vmware-tools-services | grep 
"/running" 1>/dev/null 2>&1',
        }



Testing..

[root@keiran-testing ~]# /sbin/initctl stop vmware-tools-services
vmware-tools-services stop/waiting
[root@keiran-testing ~]# /sbin/initctl status vmware-tools-services
vmware-tools-services stop/waiting
[root@keiran-testing ~]# puppet apply /tmp/RHEL_ESX_Upstart.pp
notice: /Stage[main]//Service[vmware-tools-services]/ensure: ensure changed 
'stopped' to 'running'
notice: Finished catalog run in 0.26 seconds
[root@keiran-testing ~]# /sbin/initctl status vmware-tools-services
vmware-tools-services start/running
[root@keiran-testing ~]#

Hopefully Redhat will standardise their service interface a little so that we 
dont have to do the chkconfig/upstart switcharoo all the time.

Another bug for me to keep an eye on.

K
----------------------------------------
Bug #11989: upstart service operating system confine should include redhat and 
centos
https://projects.puppetlabs.com/issues/11989#change-75151

Author: Nathan Huff
Status: Code Insufficient
Priority: Normal
Assignee: 
Category: service
Target version: 3.x
Affected Puppet version: 2.7.9
Keywords: upstart simplefix
Branch: https://github.com/puppetlabs/puppet/pull/813


RedHat EL 6 and Centos 6 both use upstart for init.  The upstart service type 
should be able to be used on those systems as well.

I have done some very minor testing to make sure it at least works to ensure 
services are running and stopped.


-- 
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.

Reply via email to