init: stopping and stopped should indicate if job is to be respawned
Say I have two jobs: foo and bar. bar is marked "respawn" and provides some service used by 'foo'. foo is marked "stop on stopping bar" so that it will stop when bar is no longer available. bar does not maintain any state, so that if it crashes, it can safely be respawned without affecting the functionality of foo.
The problem is that I need a way here to determine if 'bar' crashed and was respawned, or just was actually stopped using the "stop" command. A job which will be respawned is not marked as failed unless it is respawning too fast, and the "stopping" event is still sent with "RESULT=ok", just as it would be if it were stopped using "stop" or "stop on", never to come back.
It would be beneficial to provide either another value for "RESULT" or another environment variable which indicates whether the stopping event is due to a respawn. It could then be used in the following manner (using my foo/bar example above -- showing foo):
stop on stopping bar RESULT!=respawn
stop on stopping bar RESPAWN!=yes
|Scott James Remnant (scott) wrote : Re: [Bug 716802] [NEW] respawned jobs go to "stopping" with "RESULT=ok" and no way to detect respawn||#1|
|Matt Cowell (matthew-cowell) wrote : Re: respawned jobs go to "stopping" with "RESULT=ok" and no way to detect respawn||#4|
- respawned jobs go to "stopping" with "RESULT=ok" and no way to detect
+ init: stopping and stopped should indicate if job is to be respawned
|Changed in upstart:|
|status:||New → Triaged|
|importance:||Undecided → Wishlist|