Re: [Puppet Users] "# Only restart if we're actually running"

2011-01-05 Thread Nick Moffitt
Thomas Bellman: > Some init scripts support a 'condrestart' action, that will only > restart the service if it is already running. That is one behavior I was trying to avoid. I wanted a service to be started or restarted iff it had been notified. Neutering the start and stop commands did this

Re: [Puppet Users] "# Only restart if we're actually running"

2011-01-05 Thread Thomas Bellman
On 2010-12-21 09:14, Nick Moffitt wrote: > Nigel Kersten: >> Can you use the "basic" service provider with fully-specified >> start/stop/restart commands to achieve what you need? > > Are you suggesting that I override the start command to a noop, and make > sure the restart command works in that

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-22 Thread Alan Barrett
On Mon, 20 Dec 2010, Nick Moffitt wrote: > With the right harmonics a service could be effectively 99% > downtime and ensure => running would prevent me from finding out. The puppet logs would report that the service was being started over and over. I don't use Puppet Dashboard, but perhaps it ca

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-21 Thread Nigel Kersten
On Tue, Dec 21, 2010 at 12:14 AM, Nick Moffitt wrote: > Nigel Kersten: > > Can you use the "basic" service provider with fully-specified > > start/stop/restart commands to achieve what you need? > > Are you suggesting that I override the start command to a noop, and make > sure the restart comman

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-21 Thread Nick Moffitt
Nick Moffitt: > Are you suggesting that I override the start command to a noop, and make > sure the restart command works in that scenario? Thinking that over, it > has potential. I suppose it would refrain from starting a crashed > service, but it would pass the test in type/provider.rb that's b

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-21 Thread Nick Moffitt
Nigel Kersten: > Can you use the "basic" service provider with fully-specified > start/stop/restart commands to achieve what you need? Are you suggesting that I override the start command to a noop, and make sure the restart command works in that scenario? Thinking that over, it has potential. I

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-20 Thread Nigel Kersten
On Mon, Dec 20, 2010 at 1:33 PM, Nick Moffitt wrote: > Mark Stanislav: > > Fault tolerant infrastructure should be the point. > > Absolutely, but the granularity of nagios and puppet (Every half hour? > Every ten minutes? Every five?) is simply too coarse to qualify as > fault-tolerance. Proppi

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-20 Thread Nick Moffitt
Mark Stanislav: > Fault tolerant infrastructure should be the point. Absolutely, but the granularity of nagios and puppet (Every half hour? Every ten minutes? Every five?) is simply too coarse to qualify as fault-tolerance. Propping a broken service back on its feet at this frequency is worse t

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-20 Thread Mark Stanislav
On Dec 20, 2010, at 2:24 PM, Nick Moffitt wrote: > Mark Stanislav: >> I would recommend using Nagios event handlers for this if you want >> Nagios to essentially take the reigns of this problem. That way you >> will get your alerts and Nagios can react by starting the service >> again after x numb

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-20 Thread Nick Moffitt
Mark Stanislav: > I would recommend using Nagios event handlers for this if you want > Nagios to essentially take the reigns of this problem. That way you > will get your alerts and Nagios can react by starting the service > again after x number of failures. Actually, this is kind of the opposite

Re: [Puppet Users] "# Only restart if we're actually running"

2010-12-20 Thread Mark Stanislav
Nick, I would recommend using Nagios event handlers for this if you want Nagios to essentially take the reigns of this problem. That way you will get your alerts and Nagios can react by starting the service again after x number of failures. I understand you may want to do this through Puppet fo

[Puppet Users] "# Only restart if we're actually running"

2010-12-20 Thread Nick Moffitt
I'd like to know the best way to fix the refresh/restart behavior of Service resources without using ensure => running. I know that this is an unpopular requirement, but I do not want puppet to restart dying services before my monitoring system notices. If a service is fragile, I want to be woken