Browse Source

Merge "Add pre stop exec hook for container systemd units"

changes/65/735965/8
Zuul 3 weeks ago
committed by Gerrit Code Review
parent
commit
e5c35bdb7a
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      tripleo_ansible/roles/tripleo_container_manage/templates/systemd-service.j2

+ 3
- 0
tripleo_ansible/roles/tripleo_container_manage/templates/systemd-service.j2 View File

@@ -10,6 +10,9 @@ ExecStart=/usr/libexec/tripleo-start-podman-container {{ lookup('dict', containe
ExecStart=/usr/bin/podman start {{ lookup('dict', container_data_unit).key }}
{% endif %}
ExecReload=/usr/bin/podman kill --signal HUP {{ lookup('dict', container_data_unit).key }}
{% 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(10) | int }} {{ lookup('dict', container_data_unit).key }}
KillMode=none
Type=forking


Loading…
Cancel
Save