mirror of https://github.com/ceph/ceph-ansible.git
rolling_update: fail if less than 3 MONs
... for non-containerized deployments as well. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1655470 Signed-off-by: Ramana Raja <rraja@redhat.com>pull/3401/head
parent
14cd286e3a
commit
cb784c601d
|
@ -85,15 +85,11 @@
|
||||||
- name: set mon_host_count
|
- name: set mon_host_count
|
||||||
set_fact: mon_host_count={{ groups[mon_group_name] | length }}
|
set_fact: mon_host_count={{ groups[mon_group_name] | length }}
|
||||||
|
|
||||||
- debug: msg="WARNING - upgrading a ceph cluster with only one monitor node ({{ inventory_hostname }})"
|
- name: fail when less than three monitors
|
||||||
when: mon_host_count | int == 1
|
|
||||||
|
|
||||||
- name: fail when single containerized monitor
|
|
||||||
fail:
|
fail:
|
||||||
msg: "Upgrades of a single monitor are not supported, also running 1 monitor is not recommended always use 3."
|
msg: "Upgrade of cluster with less than three monitors is not supported."
|
||||||
when:
|
when:
|
||||||
- containerized_deployment
|
- mon_host_count | int < 3
|
||||||
- mon_host_count | int == 1
|
|
||||||
|
|
||||||
- name: stop ceph mon - shortname
|
- name: stop ceph mon - shortname
|
||||||
systemd:
|
systemd:
|
||||||
|
@ -186,9 +182,9 @@
|
||||||
- name: set mon_host_count
|
- name: set mon_host_count
|
||||||
set_fact: mon_host_count={{ groups[mon_group_name] | length }}
|
set_fact: mon_host_count={{ groups[mon_group_name] | length }}
|
||||||
|
|
||||||
- name: select a running monitor if multiple monitors
|
- name: select a running monitor
|
||||||
set_fact:
|
set_fact:
|
||||||
mon_host: "{{ groups[mon_group_name] | difference([inventory_hostname]) | last if mon_host_count > 1 else groups[mon_group_name] | last }}"
|
mon_host: "{{ groups[mon_group_name] | difference([inventory_hostname]) | last }}"
|
||||||
|
|
||||||
- name: non container | waiting for the monitor to join the quorum...
|
- name: non container | waiting for the monitor to join the quorum...
|
||||||
command: ceph --cluster "{{ cluster }}" -s --format json
|
command: ceph --cluster "{{ cluster }}" -s --format json
|
||||||
|
|
Loading…
Reference in New Issue