I've been experiencing some odd behavior with puppet and checking the status of running processes. Let me see if I can explain it:
I have a very simple node.js socket server I'm attempting to puppetize. It is managed through an init.d script with start, stop, status, and restart. The init.d script runs perfectly fine as any other user in the system. However, when puppet attempts to check status or start the server, it fails and reports it received '1' on exit.
I don't believe that the script has any hidden requirements of environment variables that aren't getting transferred around -- like I said, it's very simple. Additionally, adding debugging echo statements to the script to try and prove that it's executing at all don't appear to fire, either. It has the same permissions as plenty of other functioning init scripts. I'm pretty much at my wit's end on this one.
Relevant code:
class service::nodesocketserver {
file { '/etc/init.d/node':
ensure => present,
owner => 'root',
group => 'root',
mode => '0755',
source => 'puppet:///modules/nodejs/node',
}
service { 'node':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
require => File['/etc/init.d/node'],
}
}
Again, everything works great when I run it manually but falls down when I throw puppet at it. Any advice, more debugging angles I could take?