osd: change unit template for ceph-volume container

We don't need to pass the hostname on the container name but we can keep
it simple and just call it ceph-osd-$id.

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/3220/head
Sébastien Han 2018-09-28 18:05:42 +02:00 committed by Guillaume Abrioux
parent ece9e9812e
commit 5f35910ee1
1 changed files with 9 additions and 0 deletions

View File

@ -5,10 +5,19 @@ 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