containers: add KillMode=none to systemd templates

Because we are relying on docker|podman for managing containers then we
don't need systemd to manage the process (like kill).

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 5a03e0ee1c)
pull/5084/head
Dimitri Savineau 2020-02-11 10:09:51 -05:00 committed by Dimitri Savineau
parent 7d2a217270
commit 3617543517
14 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=grafana-server \
-e GF_INSTALL_PLUGINS={{ grafana_plugins|join(',') }} \ -e GF_INSTALL_PLUGINS={{ grafana_plugins|join(',') }} \
{{ grafana_container_image }} {{ grafana_container_image }}
ExecStop=-/usr/bin/{{ container_binary }} stop grafana-server ExecStop=-/usr/bin/{{ container_binary }} stop grafana-server
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -32,6 +32,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm \
--name=rbd-target-api \ --name=rbd-target-api \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop rbd-target-api ExecStopPost=-/usr/bin/{{ container_binary }} stop rbd-target-api
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -32,6 +32,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm \
--name=rbd-target-gw \ --name=rbd-target-gw \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop rbd-target-gw ExecStopPost=-/usr/bin/{{ container_binary }} stop rbd-target-gw
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -31,6 +31,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm \
--name=tcmu-runner \ --name=tcmu-runner \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop tcmu-runner ExecStopPost=-/usr/bin/{{ container_binary }} stop tcmu-runner
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -30,6 +30,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
--name=ceph-mds-{{ ansible_hostname }} \ --name=ceph-mds-{{ ansible_hostname }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-mds-{{ ansible_hostname }} ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-mds-{{ ansible_hostname }}
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -29,6 +29,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
--name=ceph-mgr-{{ ansible_hostname }} \ --name=ceph-mgr-{{ ansible_hostname }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-mgr-{{ ansible_hostname }} ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-mgr-{{ ansible_hostname }}
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -43,6 +43,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \
{{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStop=-/usr/bin/{{ container_binary }} stop ceph-mon-%i ExecStop=-/usr/bin/{{ container_binary }} stop ceph-mon-%i
ExecStopPost=-/bin/rm -f /var/run/ceph/{{ cluster }}-mon.{{ monitor_name }}.asok ExecStopPost=-/bin/rm -f /var/run/ceph/{{ cluster }}-mon.{{ monitor_name }}.asok
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -30,6 +30,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
--name=ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }} \ --name=ceph-nfs-{{ ceph_nfs_service_suffix | default(ansible_hostname) }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-nfs-%i ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-nfs-%i
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -21,6 +21,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=node-exporter \
--no-collector.timex \ --no-collector.timex \
--web.listen-address=:{{ node_exporter_port }} --web.listen-address=:{{ node_exporter_port }}
ExecStop=-/usr/bin/{{ container_binary }} stop node-exporter ExecStop=-/usr/bin/{{ container_binary }} stop node-exporter
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -13,6 +13,7 @@ ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-osd-%i
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-osd-%i ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-osd-%i
ExecStart={{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh %i ExecStart={{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh %i
ExecStop=-/usr/bin/{{ container_binary }} stop ceph-osd-%i ExecStop=-/usr/bin/{{ container_binary }} stop ceph-osd-%i
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -30,6 +30,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=alertmanager \
--web.external-url=http://{{ ansible_fqdn }}:{{ alertmanager_port }}/ \ --web.external-url=http://{{ ansible_fqdn }}:{{ alertmanager_port }}/ \
--web.listen-address={{ grafana_server_addr }}:{{ alertmanager_port }} --web.listen-address={{ grafana_server_addr }}:{{ alertmanager_port }}
ExecStop=/usr/bin/{{ container_binary }} stop alertmanager ExecStop=/usr/bin/{{ container_binary }} stop alertmanager
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -26,6 +26,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=prometheus \
--web.external-url=http://{{ ansible_fqdn }}:{{ prometheus_port }}/ \ --web.external-url=http://{{ ansible_fqdn }}:{{ prometheus_port }}/ \
--web.listen-address=:{{ prometheus_port }} --web.listen-address=:{{ prometheus_port }}
ExecStop=/usr/bin/{{ container_binary }} stop prometheus ExecStop=/usr/bin/{{ container_binary }} stop prometheus
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -29,6 +29,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
{{ ceph_rbd_mirror_docker_extra_env }} \ {{ ceph_rbd_mirror_docker_extra_env }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-rbd-mirror-{{ ansible_hostname }} ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-rbd-mirror-{{ ansible_hostname }}
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120

View File

@ -44,6 +44,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
{{ ceph_rgw_docker_extra_env }} \ {{ ceph_rgw_docker_extra_env }} \
{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}
ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-rgw-{{ ansible_hostname }}-${INST_NAME} ExecStopPost=-/usr/bin/{{ container_binary }} stop ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
KillMode=none
Restart=always Restart=always
RestartSec=10s RestartSec=10s
TimeoutStartSec=120 TimeoutStartSec=120