mirror of https://github.com/ceph/ceph-ansible.git
update: avoid skipping single mds deployment upgrade
otherwise a single MDS would never be updated.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d8ab11d2f8
)
pull/4675/head
parent
c599af6724
commit
73d97f525e
|
@ -542,13 +542,16 @@
|
|||
become: true
|
||||
tasks:
|
||||
- name: deactivate all mds rank > 0
|
||||
when: groups.get(mds_group_name, []) | length > 1
|
||||
when: groups.get(mds_group_name, []) | length > 0
|
||||
block:
|
||||
- import_role:
|
||||
name: ceph-defaults
|
||||
- import_role:
|
||||
name: ceph-facts
|
||||
|
||||
- name: deactivate all mds rank > 0 if any
|
||||
when: groups.get(mds_group_name, []) | length > 1
|
||||
block:
|
||||
- name: set max_mds 1 on ceph fs
|
||||
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} fs set {{ cephfs }} max_mds 1"
|
||||
changed_when: false
|
||||
|
@ -571,13 +574,6 @@
|
|||
mds_active_name: "{{ [(_mds_active_name.stdout | from_json)['filesystems'][0]['mdsmap']['info'][item.key]['name']] }}"
|
||||
with_dict: "{{ (_mds_active_name.stdout | from_json).filesystems[0]['mdsmap']['info'] }}"
|
||||
|
||||
- name: create active_mdss group
|
||||
add_host:
|
||||
name: "{{ mds_active_name[0] }}"
|
||||
groups: active_mdss
|
||||
ansible_host: "{{ hostvars[mds_active_name]['ansible_host'] | default(omit) }}"
|
||||
ansible_port: "{{ hostvars[mds_active_name]['ansible_port'] | default(omit) }}"
|
||||
|
||||
- name: create standby_mdss group
|
||||
add_host:
|
||||
name: "{{ item }}"
|
||||
|
@ -613,6 +609,13 @@
|
|||
delay: 5
|
||||
until: (wait_standbys_down.stdout | from_json).standbys | length == 0
|
||||
|
||||
- name: create active_mdss group
|
||||
add_host:
|
||||
name: "{{ mds_active_name[0] if mds_active_name is defined else groups.get(mds_group_name)[0] }}"
|
||||
groups: active_mdss
|
||||
ansible_host: "{{ hostvars[mds_active_name]['ansible_host'] | default(omit) }}"
|
||||
ansible_port: "{{ hostvars[mds_active_name]['ansible_port'] | default(omit) }}"
|
||||
|
||||
|
||||
- name: upgrade active mds
|
||||
vars:
|
||||
|
|
Loading…
Reference in New Issue