- name: get balancer module status
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
- register: balancer_status
+ register: balancer_status_adopt
run_once: true
delegate_to: "{{ groups[mon_group_name][0] }}"
changed_when: false
run_once: true
delegate_to: "{{ groups[mon_group_name][0] }}"
changed_when: false
- when: (balancer_status.stdout | from_json)['active'] | bool
+ when: (balancer_status_adopt.stdout | from_json)['active'] | bool
- name: disable pg autoscale on pools
ceph_pool:
run_once: true
delegate_to: "{{ groups[mon_group_name][0] }}"
changed_when: false
- when: (balancer_status.stdout | from_json)['active'] | bool
+ when: (balancer_status_adopt.stdout | from_json)['active'] | bool
- name: redeploy mds daemons
hosts: "{{ mds_group_name|default('mdss') }}"
- name: get balancer module status
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
- register: balancer_status
+ register: balancer_status_update
changed_when: false
check_mode: false
- name: disable balancer
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer off"
changed_when: false
- when: (balancer_status.stdout | from_json)['active'] | bool
+ when: (balancer_status_update.stdout | from_json)['active'] | bool
- name: disable pg autoscale on pools
ceph_pool:
- name: re-enable balancer
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer on"
changed_when: false
- when: (balancer_status.stdout | from_json)['active'] | bool
+ when: (balancer_status_update.stdout | from_json)['active'] | bool
- name: upgrade ceph mdss cluster, deactivate all rank > 0
hosts: "{{ mon_group_name | default('mons') }}[0]"
- name: get balancer module status
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer status -f json"
- register: balancer_status
+ register: balancer_status_switch
changed_when: false
check_mode: false
- name: disable balancer
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer off"
changed_when: false
- when: (balancer_status.stdout | from_json)['active'] | bool
+ when: (balancer_status_switch.stdout | from_json)['active'] | bool
- name: disable pg autoscale on pools
ceph_pool:
- name: re-enable balancer
command: "{{ ceph_cmd }} --cluster {{ cluster }} balancer on"
changed_when: false
- when: (balancer_status.stdout | from_json)['active'] | bool
+ when: (balancer_status_switch.stdout | from_json)['active'] | bool
- name: switching from non-containerized to containerized ceph mds