[s6-rc] How to handle longrun failures

From: Van Bemten, Lionel (Nokia - BE) <"Van>
Date: Thu, 2 Mar 2017 13:43:03 +0000

Hello,


Using s6-rc, I am not sure how to handle longrun failures. Say I have a daemon which fails to start (e.g. missing library, cannot read its config...). I don't want to start it again. For oneshot transitions the return code determines whether the transition is successful or not. For longruns I see the only reason for an up transition to fail is a timeout on readiness notification. However I do not want to use a timeout in this case. Typically, in the finish script of a longrun service, I would like to decide, based on the return code or signal number, to put the service down. I cannot call "s6-rc -d change" because probably s6-rc is already in the middle of a state transition which caused the daemon to start. I can call "s6-svc -d ." but then I bypass s6-rc which will have a corrupted state.


Any recommendation on how to implement this?

Kr,

Lionel
Received on Thu Mar 02 2017 - 13:43:03 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC