Page MenuHomeDevCentral

Configure systemd unit to restart Odderon on non 0 exit
ClosedPublic

Authored by dereckson on Jun 3 2017, 19:05.
Referenced Files
F34221437: D994.diff
Sat, Jun 27, 01:49
F34203040: D994.diff
Fri, Jun 26, 14:05
Unknown Object (File)
Sun, Jun 21, 03:36
Unknown Object (File)
Fri, Jun 19, 16:06
Unknown Object (File)
Wed, Jun 17, 12:39
Unknown Object (File)
Wed, Jun 17, 07:03
Unknown Object (File)
Mon, Jun 15, 20:59
Unknown Object (File)
Thu, Jun 11, 06:26
Subscribers
None

Details

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).

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson added a project: systemd.
dereckson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jun 5 2017, 21:18
This revision was automatically updated to reflect the committed changes.