]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-osd: update systemd unit script
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 9 Dec 2019 14:43:17 +0000 (09:43 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 10 Dec 2019 22:59:13 +0000 (23:59 +0100)
The systemd unit script wasn't updated with the new container name
format (without the hostname).
We now have the same start/stop docker commands for all scenarios.
During the device to id OSD migration we need to be sure that the
old container with the hostname are stopped.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1780688
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-osd/templates/ceph-osd.service.j2

index d7297e0e805e0cd3160cdd7e52086b93ac78ed2d..8ac36ceabb847f669b763dce1a79a7201d9a158e 100644 (file)
@@ -5,19 +5,10 @@ After=docker.service
 
 [Service]
 EnvironmentFile=-/etc/environment
-{% if osd_scenario == 'lvm' -%}
 ExecStartPre=-/usr/bin/docker stop ceph-osd-%i
 ExecStartPre=-/usr/bin/docker rm -f ceph-osd-%i
-{% else %}
-ExecStartPre=-/usr/bin/docker stop ceph-osd-{{ ansible_hostname }}-%i
-ExecStartPre=-/usr/bin/docker rm -f ceph-osd-{{ ansible_hostname }}-%i
-{% endif -%}
 ExecStart={{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh %i
-{% if osd_scenario == 'lvm' -%}
 ExecStop=-/usr/bin/docker stop ceph-osd-%i
-{% else %}
-ExecStop=-/usr/bin/docker stop ceph-osd-{{ ansible_hostname }}-%i
-{% endif -%}
 Restart=always
 RestartSec=10s
 TimeoutStartSec=120