Apply fix with some tweaks to other serial handlers

This commit is contained in:
Joshua Boniface 2019-12-25 13:45:29 -05:00
parent af606ac49c
commit a66d17252f
1 changed files with 5 additions and 3 deletions

View File

@ -30,14 +30,16 @@
# * etc. # * etc.
# This results in a practical sense in a "serial=1" sequence of restarts allowing the service # This results in a practical sense in a "serial=1" sequence of restarts allowing the service
# to float its primary around after changing a configuration. # to float its primary around after changing a configuration.
# Note that this only applies to coordinators; hypervisor-only nodes restart immediately in
# parallel, and the first two of three handlers do not apply to hypervisor-only nodes.
- name: restart ceph-mon - name: restart ceph-mon
shell: sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mon@{{ ansible_hostname }}.service shell: "{% if is_coordinator %}sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mon@{{ ansible_hostname }}.service{% endif %}"
ignore_errors: true ignore_errors: true
- name: restart ceph-mgr - name: restart ceph-mgr
shell: sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mgr@{{ ansible_hostname }}.service shell: "{% if is_coordinator %}sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mgr@{{ ansible_hostname }}.service{% endif %}"
ignore_errors: true ignore_errors: true
- name: restart pvcd - name: restart pvcd
shell: sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart pvcd.service shell: "{% if is_coordinator %}sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} &&{% endif %} systemctl restart pvcd.service"
ignore_errors: true ignore_errors: true