service * { enable = true } fails on puppet runs... (one client only)

842 views
Skip to first unread message

trey85stang

unread,
Jul 16, 2012, 3:50:50 PM7/16/12
to puppet...@googlegroups.com
I have a puppet client that fails when trying to enable mcollective and nrpe (the only two services I have enable set for).  I have 160+ machines that this works fine on but one just gives me the following:

Jul 16 15:21:21 server1 puppet-agent[29413]: (/Stage[main]/Mcollective/Service[mcollective]/enable) change from false to true failed: Could not enable mcollective: Exec
ution of '/sbin/chkconfig mcollective on' returned 1:
Jul 16 15:21:21 server1 puppet-agent[29413]: (/Stage[main]/Nagios_plugins/Service[nrpe]/enable) change from false to true failed: Could not enable nrpe: Execution of '/
sbin/chkconfig nrpe on' returned 1:
Jul 16 15:21:21 server1 puppet-agent[29413]: Finished catalog run in 2.38 seconds

The problem is,  these commands return zero when I run as root (puppet runs as root)

[ server1 ~]# /sbin/chkconfig mcollective on
[ server1 ~]# echo $?
0
[ server1 ~]# /sbin/chkconfig nrpe on
[ server1 ~]# echo $?
0

[ server1 ~]# cat /etc/redhat-release
CentOS release 5.2 (Final)
[ server1 ~]# rpm -qa | grep puppet
puppet-2.7.18-1.el5.noarch


Any idea what is going on here?  I can post the debug entries if it will help but it doesnt tell much more then what the messages log says.

Thanks,
Trey

 


Corey Hammerton

unread,
Jul 16, 2012, 4:40:42 PM7/16/12
to puppet...@googlegroups.com
In the service resource set the provider parameter to 'redhat':

service{'mcollective':
provider=>'redhat',
enable=>true
...

trey85stang

unread,
Jul 16, 2012, 4:57:47 PM7/16/12
to puppet...@googlegroups.com
That is a no go as well

  service { nrpe:
    ensure     => running,
    provider   => redhat,
    enable     => true,
    hasrestart => true,
    hasstatus  => true,
  }


  service { mcollective:
    ensure     => running,
    provider   => redhat,
    enable     => true,
    hasrestart => true,
    hasstatus  => true,
  }

Same error message in log as before. 

Corey Hammerton

unread,
Jul 16, 2012, 6:23:15 PM7/16/12
to puppet...@googlegroups.com
it works for me when redhat is quoted. 

jcbollinger

unread,
Jul 17, 2012, 9:18:03 AM7/17/12
to puppet...@googlegroups.com


On Monday, July 16, 2012 5:23:15 PM UTC-5, Corey Hammerton wrote:
it works for me when redhat is quoted. 

Puppet generally does a good job of choosing the right provider, so it is rarely necessary to specify one explicitly.  That's especially so for RedHat variants, which tend to be well tested and well supported.  In particular, I have never needed to specify a Service provider explicitly for CentOS 5.x / 6.x clients.

Furthermore, it is a matter of good style to quote parameter values, but it is not actually necessary to do so for many of them, especially those that are strictly alphanumeric.

Since the manifests work on a large number of boxes and fail only on one, it seems likely that there's something strange about the odd system that's causing the problem.  Is the Puppet running as root, or at least as a sufficiently-privileged user?  Speaking of privilege, is SELinux running in enforcing mode?

John

trey85stang

unread,
Jul 17, 2012, 10:24:23 AM7/17/12
to puppet...@googlegroups.com
Im with you in thinking it is a host issue I thought I would check here first before abandoning hope.  Puppet is ran as root and selinux is disabled.

trey85stang

unread,
Jul 17, 2012, 1:03:48 PM7/17/12
to puppet...@googlegroups.com
ok,  verified it was 100% a host problem puppet did good showing the error.  the binary of chkconfig was corrupt every command line argument output a return code of 0 no matter what.  Im not sure where puppet got that the command actually failed... but im glad it did.


Reply all
Reply to author
Forward
0 new messages