You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a simple script like the one below - the lifecycle events will die when the job is restarted via god restart simple. This will also happen in other circumstances when other transitions are active, but this should be simple enough to reproduce it.
> sudo god --no-daemonize --log-level debug
I [2013-11-01 15:53:43] INFO: Syslog enabled.
I [2013-11-01 15:53:43] INFO: Using pid file directory: /var/run/god
I [2013-11-01 15:53:43] INFO: Started on drbunix:///tmp/god.17165.sock
I [2013-11-01 15:53:55] INFO: simple Loaded config
I [2013-11-01 15:53:55] INFO: simple move 'unmonitored' to 'up'
D [2013-11-01 15:53:55] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 0 seconds
I [2013-11-01 15:53:55] INFO: simple moved 'unmonitored' to 'up'
I [2013-11-01 15:53:55] INFO: simple [ok] process is not running (ProcessRunning)
D [2013-11-01 15:53:55] DEBUG: simple ProcessRunning [false] none
D [2013-11-01 15:53:55] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 3 seconds
I [2013-11-01 15:53:58] INFO: simple [ok] process is not running (ProcessRunning)
D [2013-11-01 15:53:58] DEBUG: simple ProcessRunning [false] none
D [2013-11-01 15:53:58] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 3 seconds
I [2013-11-01 15:54:01] INFO: simple [ok] process is not running (ProcessRunning)
D [2013-11-01 15:54:01] DEBUG: simple ProcessRunning [false] none
D [2013-11-01 15:54:01] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 3 seconds
I [2013-11-01 15:54:04] INFO: simple [ok] process is not running (ProcessRunning)
D [2013-11-01 15:54:04] DEBUG: simple ProcessRunning [false] none
D [2013-11-01 15:54:04] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 3 seconds
Log [Stopping the job and restarting - lifecycle is reenabled]
I [2013-11-01 15:54:06] INFO: simple stop: default lambda killer
I [2013-11-01 15:54:06] INFO: simple sent SIGTERM
I [2013-11-01 15:54:06] INFO: simple process stopped
I [2013-11-01 15:54:06] INFO: simple move 'up' to 'unmonitored'
I [2013-11-01 15:54:06] INFO: simple moved 'up' to 'unmonitored'
I [2013-11-01 15:54:11] INFO: simple move 'unmonitored' to 'up'
D [2013-11-01 15:54:11] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 0 seconds
I [2013-11-01 15:54:11] INFO: simple moved 'unmonitored' to 'up'
I [2013-11-01 15:54:11] INFO: simple [ok] process is not running (ProcessRunning)
D [2013-11-01 15:54:11] DEBUG: simple ProcessRunning [false] none
D [2013-11-01 15:54:11] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 3 seconds
I [2013-11-01 15:54:14] INFO: simple [ok] process is not running (ProcessRunning)
D [2013-11-01 15:54:14] DEBUG: simple ProcessRunning [false] none
D [2013-11-01 15:54:14] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 3 seconds
Log [restart - lifecycle dies]
I [2013-11-01 15:54:28] INFO: simple [ok] process is not running (ProcessRunning)
D [2013-11-01 15:54:28] DEBUG: simple ProcessRunning [false] none
D [2013-11-01 15:54:28] DEBUG: driver schedule #<God::Conditions::ProcessRunning:0x007fe3e8837060> in 3 seconds
I [2013-11-01 15:54:29] INFO: simple move 'up' to 'restart'
I [2013-11-01 15:54:29] INFO: simple stop: default lambda killer
I [2013-11-01 15:54:29] INFO: simple sent SIGTERM
I [2013-11-01 15:54:29] INFO: simple process stopped
I [2013-11-01 15:54:29] INFO: simple start: echo "test" > /dev/null
I [2013-11-01 15:54:29] INFO: simple moved 'up' to 'up'
Without having tested it, I'd think that changing the condition to orig_to_state != :unmonitored should do the trick - as lifecycle events should be enabled whenever we're not unmonitored.
The text was updated successfully, but these errors were encountered:
Given a simple script like the one below - the lifecycle events will die when the job is restarted via
god restart simple
. This will also happen in other circumstances when other transitions are active, but this should be simple enough to reproduce it.Log [starting the job - lifecycle is enabled]
Log [Stopping the job and restarting - lifecycle is reenabled]
Log [restart - lifecycle dies]
As far as I can see - the offending lines are here: https://github.com/mojombo/god/blob/master/lib/god/task.rb#L225-L228
Without having tested it, I'd think that changing the condition to
orig_to_state != :unmonitored
should do the trick - as lifecycle events should be enabled whenever we're not unmonitored.The text was updated successfully, but these errors were encountered: