[systemd-devel] reacting to unit failures (OnFailure)

"J├│hann B. Gu├░mundsson" johannbg at gmail.com
Tue Dec 2 07:27:46 PST 2014


On 12/02/2014 03:12 PM, Nekrasov, Alexander wrote:
> Lennart just gave me a solution, thank you. I'll use templates
>
> I have a system where components at the "single node" level have dependencies and HA policies, such as "restart this many times within this interval, if still fails - run this action" where action is a sequence of commands. Components provide this information in their own language and I have to generate systemd configuration for them. It's more complex than just rebooting the node so I couldn't use FailureAction.

Right but you already have
Restart=on-failure
RestartSec=...

and the likes to restart the services in graceful HA manner ( and at the 
sametime allowing it to fail gracefully ) so what I was curious about 
what else you are doing in the background since it might lead to a worse 
situation in HA setup by doing so depending on the HA setup ( split 
brains etc you know the drill ).

JBG


More information about the systemd-devel mailing list