HomeDevCentral

Configure systemd unit to restart Odderon on non 0 exit

Description

Configure systemd unit to restart Odderon on non 0 exit

Summary:
The darkbot software implements a feature to catch exceptions like
a segmentation fault, and then exits properly the software with
a non zero code.

The quit message on IRC explains the intercepted signal:
Quit: Caught SIG_SEGV! Aborting connection. Uptime: 893 hours, 10 mins

In such case, we want systemd to immediately restart the service,
to improve service availability. This is not the default behavior,
as systemd prefers to mark unit status as failed.

Reference: https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart=

Fixes T1213.

Test Plan:

  • Deploy on Eglide
    • Function service.force_reload from odderon_unit took care to reload systemd configuration
    • Function service.running from odderon_running state took care to restart the service
  • Unit status switched from failed to an active (running).

Reviewers: Sandlayth, dereckson

Reviewed By: Sandlayth, dereckson

Tags: systemd

Maniphest Tasks: T1213

Differential Revision: https://devcentral.nasqueron.org/D994

Details