diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 30f977254..03e51f41c 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -461,6 +461,19 @@ - ceph_versions_osd | string is search("ceph version 12") +- name: run crush rules on osd nodes + hosts: "{{ osd_group_name|default('osds') }}" + become: True + tasks: + roles: + - ceph-defaults + - ceph-facts + post_tasks: + - import_role: + name: ceph-osd + tasks_from: crush_rules + + - name: upgrade ceph mdss cluster, deactivate all rank > 0 hosts: "{{ groups[mon_group_name|default('mons')][0] }}" become: true diff --git a/roles/ceph-osd/tasks/main.yml b/roles/ceph-osd/tasks/main.yml index c1f27cb5d..2344b0d4a 100644 --- a/roles/ceph-osd/tasks/main.yml +++ b/roles/ceph-osd/tasks/main.yml @@ -91,7 +91,9 @@ - name: include crush_rules.yml include_tasks: crush_rules.yml - when: hostvars[groups[mon_group_name][0]]['crush_rule_config'] | default(false) | bool + when: + - hostvars[groups[mon_group_name][0]]['crush_rule_config'] | default(false) | bool + - not rolling_update | bool - name: set_fact openstack_keys_tmp - preserve backward compatibility after the introduction of the ceph_keys module set_fact: