Merge "Make sure failed containers get stopped by systemd" into stable/ussuri

This commit is contained in:
Zuul 2020-07-21 12:15:47 +00:00 committed by Gerrit Code Review
commit b7433ba7f7
2 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class TestUtilsSystemd(base.TestCase):
self.assertIn('Wants=something.service', unit)
self.assertIn('Restart=always', unit)
self.assertIn('ExecStop=/usr/bin/podman stop -t 15 my_app', unit)
self.assertIn('ExecStopPost=/usr/bin/podman stop -t 15 my_app', unit)
self.assertIn('PIDFile=/var/run/my_app.pid', unit)
mock_chmod.assert_has_calls([mock.call(sysd_unit_f, 420)])

View File

@ -101,6 +101,7 @@ Restart=%(restart)s
ExecStart=%(start_cmd)s
ExecReload=/usr/bin/podman kill --signal HUP %(name)s
ExecStop=/usr/bin/podman stop -t %(stop_grace_period)s %(name)s
ExecStopPost=/usr/bin/podman stop -t %(stop_grace_period)s %(name)s
KillMode=none
Type=forking
PIDFile=/var/run/%(name)s.pid