Commit eee57647 authored by Guillaume Abrioux's avatar Guillaume Abrioux
Browse files

update: convert straw bucket

After an upgrade, the presence of straw buckets will produce the
following warning (HEALTH_WARN):

crush map has legacy tunables (require firefly, min is hammer)

because straw bucket is a firefly feature it needs to be converted to


Signed-off-by: default avatarGuillaume Abrioux <>
parent aeb9f562
......@@ -1033,6 +1033,43 @@
- import_role:
name: ceph-dashboard
- name: switch any existing crush buckets to straw2
hosts: "{{ mon_group_name | default('mons') }}[0]"
become: true
any_errors_fatal: true
gather_facts: false
- import_role:
name: ceph-defaults
- import_role:
name: ceph-facts
tasks_from: container_binary.yml
- name: set_fact ceph_cmd
ceph_cmd: "{{ container_binary + ' run --rm --net=host -v /etc/ceph:/etc/ceph:z --entrypoint=ceph ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph_docker_image_tag if containerized_deployment | bool else 'ceph' }}"
- name: backup the crushmap
command: "{{ ceph_cmd }} --cluster {{ cluster }} osd getcrushmap -o /etc/ceph/{{ cluster }}-crushmap"
changed_when: false
- block:
- name: switch crush buckets to straw2
command: "{{ ceph_cmd }} --cluster {{ cluster }} crush set-all-straw-buckets-to-straw2"
changed_when: false
- name: restore the crushmap
command: "{{ ceph_cmd }} --cluster {{ cluster }} osd setcrushmap -i /etc/ceph/{{ cluster }}-crushmap"
changed_when: false
- name: switching to straw2 buckets failed
msg: >
"An attempt to switch to straw2 bucket was made but failed.
Check the cluster status."
- name: show ceph status
hosts: "{{ mon_group_name|default('mons') }}"
become: True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment