On Friday, November 16, 2012 6:51:19 PM UTC-6, Steven wrote: > > If it is happening every time, it is usually an issue with init script. > Puppet is not understanding the output of the init script, so it is not > saving the correct state. >
Minor correction: it's not about what state Puppet "saves", but rather about what state Puppet *detects*. Supposing that Puppet is using the "redhat" Service provider (since you mention chkconfig), it is determining the services' state via the exit code of command "/sbin/service <servicename> status", with reference to the LSB standard for initscript exit codes. Hence Steven's suggestion to > Run the init script manually and see what it is returning. If it is not > obvious, run puppet with --debug and see the exact command puppet is running > > I note, however, that Redhat Linuxes and their derivatives (i.e. RHEL, Fedora, CentOS, Scientific Linux, etc.) are very reliable with respect to standards conformance in this area, so it's a bit strange to see a problem such as you describe on a system that appears to be in that class. Are you certain that the agent is running Puppet 2.7.19? The Service type has a parameter 'hasstatus' which used to default to false, but now defaults to true. Back when it defaulted to false, you would typically want to set it true where your initscript provided a standard-compliant 'status' command, and elsewhere you would sometimes need to set an explicit status testing command via the 'status' parameter. Of course, the flip side is that with recent Puppet, if your initscript does not support 'status' correctly, and you can't or won't fix it, then you need to tell Puppet "hasstatus => false" and "status => <command-to-determine-status>". John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZTpLGYwQ2qkJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.