Page MenuHomeDevCentral

Configure systemd unit to restart Odderon on non 0 exit
ClosedPublic

Authored by dereckson on Jun 3 2017, 19:05.
Referenced Files
Unknown Object (File)
Tue, Dec 17, 03:48
Unknown Object (File)
Sat, Dec 14, 14:12
Unknown Object (File)
Sun, Dec 8, 07:33
Unknown Object (File)
Sun, Dec 8, 07:33
Unknown Object (File)
Sun, Dec 8, 07:19
Unknown Object (File)
Mon, Dec 2, 16:58
Unknown Object (File)
Mon, Dec 2, 16:58
Unknown Object (File)
Mon, Dec 2, 16:31
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.