Implement a systemd watchdog daemon to run import-source-packages.py
Git Ubuntu's package importing functionality is invoked via the
import-source-packages.py script. Previously, this script would be
manually started, and on error needed manual intervention.
Instead, wrap the script in a systemd service that starts it up
initially and restarts it on crash. A watchdog timer is used to detect
if the script has hung, and restarts it after a suitable delay.
Another service is added for sending emails when the service crashes,
extracting status from the journal. Errors can also be reviewed using
journalctl normally.
By default, everything is configured to be installable in production,
but configuration considerations are covered in documentation. There
are no unit tests for this, however some testing/validation tips are
identified in the documentation.
Fixed in the following commit (and refined in a couple subsequent commits). Change is landed to production, and snaps updated.
commit 5d104bce612db56 f3274c667ee7b00 8da5e68c18
Author: Bryce Harrington <email address hidden>
Date: Thu Oct 3 07:19:19 2019 -0700
Implement a systemd watchdog daemon to run import- source- packages. py
Git Ubuntu's package importing functionality is invoked via the source- packages. py script. Previously, this script would be
import-
manually started, and on error needed manual intervention.
Instead, wrap the script in a systemd service that starts it up
initially and restarts it on crash. A watchdog timer is used to detect
if the script has hung, and restarts it after a suitable delay.
Another service is added for sending emails when the service crashes,
extracting status from the journal. Errors can also be reviewed using
journalctl normally.
By default, everything is configured to be installable in production,
but configuration considerations are covered in documentation. There
are no unit tests for this, however some testing/validation tips are
identified in the documentation.
LP: #1838954