On Saturday, January 10, 2015 at 11:51:27 AM UTC-6, Brian Lock wrote:
>
> If the puppet agent isn't running on a server and you issue the command  
> sudo /etc/init.d/puppet stop, and you have also disables execute access on 
> the file /etc/init.d/puppet by chmod -x , why does puppet run from the 
> master at its pre-prescribed time? 
>


Running the agent's service control script with 'stop' as its argument is 
meaningless if the service is in fact already stopped.  Turning off the 
execute bit on the service control script *might* cause the system to error 
out if when trying to start the agent *service* via the service control 
tools, but that's the most you can expect (and even that could depend on 
the implementation of your service control tools).  In no way does it 
prevent the agent from being started by other means, whether as a service 
or not.

If you don't want Puppet *ever* to run then don't mess around; just 
uninstall it.

If you want to temporarily prevent the agent from performing catalog runs, 
then run 'puppet agent --disable'.

If you want to be able to run the agent on demand, but you don't want it to 
be recognized by your service control tools, then use your service control 
tools' mechanism for unregistering it.  On RedHat-family systems, for 
example, you might do 'chkconfig --del puppet'.  Note that this in no way 
prevents the agent from running as a service; it just prevents your service 
control tools from being used to start it.

If you want the agent to be installed normally, but for the agent service 
not to be automatically started by the system, then once again, turn to 
your service control tools.  On RedHat-family systems, for example, you 
might do 'chkconfig --level 12345 puppet off'.  Similar to the previous 
case, this in no way prevents the agent from running as a service; it just 
prevents your service control tools from starting it *automatically*.

In any case, you cannot have the Puppet agent available to run on demand 
without the possibility that it will be started as a service.  In your 
particular case, however, I suspect you are barking up the wrong tree.  If 
the agent is running on the system on a regular schedule, but the agent 
daemon as not running (whether or not started via the system's service 
control tools), then *something else* is running it.  It is relatively 
common for the agent to be run from a general-purpose scheduler (i.e. 
cron), so I'd look into that possibility.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/425d63eb-6d17-433a-9def-ccb1721895d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to