openSUSE / containers-systemd

Systemd service files to run various openSUSE containers by systemd and podman
MIT License
13 stars 4 forks source link

Only restart containers when the process fails abnormally #4

Closed sysrich closed 3 years ago

sysrich commented 3 years ago

restarting the service "on-failure" can easily cause services to loop around repeatedly if the container is misconfigured. This hinders debugging.

"on-abnormal" will ensure the container remains stopped whenever it fails with an error code, but will restart in other circumstances, including timeouts and core dumps.

note- this wouldn't be best practice if we used Docker Hub or any other rate limited registry, as the rate-limiting causes timeouts, which are considered an abnormal failure, triggering a restart, and a pull, which will keep the user limited. "on-abort" should be used in that case.