Instruct systemd to accept 137 and 143 exit code
It might happen a container takes time to stop its running process - it therefore will call "SIGTERM" or "SIGKILL", and conmon will return the actual process exit code. Since the exit code won't be 0, it will be marked as "failed" in systemd status. Note that 137 is, actually, SIGKILL (137-128 = 9) and 143 is SIGTERM (143-128 = 15). While systemd accepts actual SIGTERM by default, it doesn't recognize that 143 exit status. We therefore have to namely point to this status code. Also, by default, SIGKILL isn't accepted as a valid, successful exit status. This change will needs to be backported down to stable/train - and another one will be created against triple-ansible. Change-Id: Iffcfc8bd18a999ae6921a4131d40241df40050f1
This commit is contained in:
parent
4ae7d886db
commit
c19a95d2eb
|
@ -102,6 +102,7 @@ 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
|
||||
SuccessExitStatus=137 143
|
||||
KillMode=none
|
||||
Type=forking
|
||||
PIDFile=/var/run/%(name)s.pid
|
||||
|
|
Loading…
Reference in New Issue