Handle restarting ceph-mon/mgr sequentially

This commit is contained in:
Joshua Boniface 2019-06-18 21:37:42 -04:00
parent 34ba09a1c7
commit f5ec3968c3
2 changed files with 25 additions and 0 deletions

View File

@ -19,6 +19,28 @@
name: patroni name: patroni
state: restarted state: restarted
# Restart ceph-mon, but sequentially one-host-at-a-time with a 15s wait in between; this provides
# plenty of time for the primary state to switch around without putting the cluster in a
# no-primary state
- name: restart ceph-mon
shell: systemctl restart ceph-mon@{{ play_host }} && sleep 15
run_once: true
delegate_to: "{{ play_host }}"
with_items: "{{ play_hosts }}"
loop_control:
loop_var: play_host
# Restart ceph-mgr, but sequentially one-host-at-a-time with a 15s wait in between; this provides
# plenty of time for the primary state to switch around without putting the cluster in a
# no-primary state
- name: restart ceph-mgr
shell: systemctl restart ceph-mgr@{{ play_host }} && sleep 15
run_once: true
delegate_to: "{{ play_host }}"
with_items: "{{ play_hosts }}"
loop_control:
loop_var: play_host
# Restart pvcd, but sequentially one-host-at-a-time with a 15s wait in between; this provides # Restart pvcd, but sequentially one-host-at-a-time with a 15s wait in between; this provides
# plenty of time for the primary state to switch around without putting the cluster in a # plenty of time for the primary state to switch around without putting the cluster in a
# no-primary state # no-primary state

View File

@ -44,6 +44,9 @@
owner: ceph owner: ceph
group: ceph group: ceph
mode: 0640 mode: 0640
notify:
- restart ceph-mon
- restart ceph-mgr
with_items: with_items:
- ceph.conf - ceph.conf
- ceph.mon.keyring - ceph.mon.keyring