Remove execpost and align systemd timeouts
Align systemd timeouts to podman[1]. Remove stop command with ExecStopPost command, because it won't help much to run same command twice if it's stuck. Set default time for stop command to 50 if not defined otherwise. In case it's stuck, systemd will nuke everything (TimeoutStopSec=60) 60 seconds = 50 seconds of trying to stop + 10 seconds for avoiding the race. [1] https://github.com/containers/podman/pull/8889 Change-Id: Ife90b6c45b7f4a3fd829b60f9aa785fc580a31b8
This commit is contained in:
parent
badd5a3c10
commit
fdfc59cd1d
|
@ -15,10 +15,9 @@ ExecReload=/usr/bin/podman kill --signal {{ lookup('dict', container_data_unit).
|
|||
{% if lookup('dict', container_data_unit).value.pre_stop_exec is defined %}
|
||||
ExecStop=-/usr/bin/podman exec {{ lookup('dict', container_data_unit).key }} {{ lookup('dict', container_data_unit).value.pre_stop_exec }}
|
||||
{% endif %}
|
||||
ExecStop=/usr/bin/podman stop -t {{ lookup('dict', container_data_unit).value.stop_grace_period | default(42) | int }} {{ lookup('dict', container_data_unit).key }}
|
||||
ExecStopPost=/usr/bin/podman stop -t {{ lookup('dict', container_data_unit).value.stop_grace_period | default(42) | int }} {{ lookup('dict', container_data_unit).key }}
|
||||
ExecStop=/usr/bin/podman stop -t {{ lookup('dict', container_data_unit).value.stop_grace_period | default(50) | int }} {{ lookup('dict', container_data_unit).key }}
|
||||
SuccessExitStatus=137 142 143
|
||||
TimeoutStopSec={{ 2*lookup('dict', container_data_unit).value.stop_grace_period | default(42) | int }}
|
||||
TimeoutStopSec={{ 2*lookup('dict', container_data_unit).value.stop_grace_period | default(60) | int }}
|
||||
Type=forking
|
||||
PIDFile=/run/{{ lookup('dict', container_data_unit).key }}.pid
|
||||
{% if lookup('dict', container_data_unit).value.systemd_exec_flags is defined %}
|
||||
|
|
Loading…
Reference in New Issue