2017-02-08 05:00:53 +08:00
|
|
|
# {{ ansible_managed }}
|
2016-02-11 02:15:52 +08:00
|
|
|
[Unit]
|
|
|
|
Description=Ceph OSD
|
|
|
|
After=docker.service
|
|
|
|
|
|
|
|
[Service]
|
2016-03-29 16:23:31 +08:00
|
|
|
EnvironmentFile=-/etc/environment
|
2018-09-29 00:05:42 +08:00
|
|
|
{% if osd_scenario == 'lvm' -%}
|
2018-11-08 17:02:37 +08:00
|
|
|
ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-osd-%i
|
|
|
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-osd-%i
|
2018-09-29 00:05:42 +08:00
|
|
|
{% else %}
|
2018-11-08 17:02:37 +08:00
|
|
|
ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-osd-{{ ansible_hostname }}-%i
|
|
|
|
ExecStartPre=-/usr/bin/{{ container_binary }} rm -f ceph-osd-{{ ansible_hostname }}-%i
|
2018-09-29 00:05:42 +08:00
|
|
|
{% endif -%}
|
2017-02-17 05:13:26 +08:00
|
|
|
ExecStart={{ ceph_osd_docker_run_script_path }}/ceph-osd-run.sh %i
|
2018-09-29 00:05:42 +08:00
|
|
|
{% if osd_scenario == 'lvm' -%}
|
2018-11-08 17:02:37 +08:00
|
|
|
ExecStop=-/usr/bin/{{ container_binary }} stop ceph-osd-%i
|
2018-09-29 00:05:42 +08:00
|
|
|
{% else %}
|
2018-11-08 17:02:37 +08:00
|
|
|
ExecStop=-/usr/bin/{{ container_binary }} stop ceph-osd-{{ ansible_hostname }}-%i
|
2018-09-29 00:05:42 +08:00
|
|
|
{% endif -%}
|
2016-02-11 02:15:52 +08:00
|
|
|
Restart=always
|
|
|
|
RestartSec=10s
|
|
|
|
TimeoutStartSec=120
|
|
|
|
TimeoutStopSec=15
|
|
|
|
|
|
|
|
[Install]
|
2016-07-09 09:38:13 +08:00
|
|
|
WantedBy=multi-user.target
|