On 04/09/2015 03:12 PM, Gabriel Filion wrote:
Puppet is really good at managing steady states. Why not have puppet manage 
cron entries responsible for starting and stopping the daemon? A custom fact 
could be used to return the current on/off state (accurate as of the last 
puppet run, or course) of the daemon for auditing purposes.
ah yes, I actually had thought about this but forgot to mention it. this
would be actually more reliable time-wise.

my only concern would then be if the service crashes during the "on"
period or gets started by someone for any reason in the "off" period and
forgotten there. puppet would add a safety net by ensuring the service's
state.. I'll have to verify if this can be possible and/or a concern
before I try to fix this part.

thanks for the input.


Set your cron jobs to run every minute during the period, so that the service will be running (or not) for at most 1 minute after a human-error / crash / reboot / deploy-new-node-due-to-auto-scaling event. Yes, it's kind of brute-force-ish, but the overhead to check a service's state and start/stop it isn't that high.

If the goal is to make sure that the service is or is not running during certain time periods, would you rather wait an hour for a Puppet agent run or a minute for a cron job?

- Peter

--
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/5526D0D3.3000702%40alter3d.ca.
For more options, visit https://groups.google.com/d/optout.

Reply via email to