Determine when restart fails

Michael Barrett loki77 at gmail.com
Wed Mar 5 20:53:33 UTC 2014


Awesome, thanks a ton!


On Wed, Mar 5, 2014 at 6:53 AM, James Hunt <james.hunt at ubuntu.com> wrote:

> ... forgot to say that I have updated the Cookbook on this topic:
>
> - http://upstart.ubuntu.com/cookbook/#respawn
> - http://upstart.ubuntu.com/cookbook/#respawn-limit
>
>
> 2014-03-05 14:51 GMT+00:00 James Hunt <james.hunt at ubuntu.com>:
>
> Hi Michael,
>>
>> 2014-03-04 19:26 GMT+00:00 Michael Barrett <loki77 at gmail.com>:
>>
>> Is there anyway to tell the difference between these different 'stopped'
>>> situations:
>>> - The daemon was stopped by a user command (service <daemon> stop)
>>>
>> $UPSTART_EVENTS will not be set in this scenario (since no event caused
>> the job to stop - an admin intervened).
>>
>> - The daemon died, but is has not reached the respawn limit and is
>>> restarting.
>>>
>>   In this scenario, $PROCESS will be set to the name of the job process
>> that failed (for example 'pre-start', 'main').
>>
>>  - The daemon died and is not going to attempt to respawn due to
>>> whatever reason (no respawn, or reaching the respawn limit)
>>>
>>  In this scenario, if the respawn stanzas was specified, $PROCESS will be
>> set to 'respawn' to denote that the respawn limit was reached.
>>
>> If the respawn stanza was not specified, $PROCESS will not be set.
>> However, in both scenarios upstart will set $EXIT_STATUS or $EXIT_SIGNAL
>> (whichever is appropriate).
>>
>> See stopped(7) and init(5) for further details.
>>
>>
>>> Thanks!
>>>
>>> --
>>> Michael Barrett
>>>
>>> --
>>> upstart-devel mailing list
>>> upstart-devel at lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/upstart-devel
>>>
>>>
>>
>>
>> --
>> Kind regards,
>>
>> James.
>> --
>> James Hunt
>> ____________________________________
>> #upstart on freenode
>> http://upstart.ubuntu.com/cookbook
>> https://lists.ubuntu.com/mailman/listinfo/upstart-devel
>>
>
>
>
> --
> Kind regards,
>
> James.
> --
> James Hunt
> ____________________________________
> #upstart on freenode
> http://upstart.ubuntu.com/cookbook
> https://lists.ubuntu.com/mailman/listinfo/upstart-devel
>



-- 
Michael Barrett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20140305/19487146/attachment.html>


More information about the upstart-devel mailing list