From 8b2659bf6d35d04bd98a9f6b754034d48606e6e5 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 18 Nov 2019 11:07:16 -0500 Subject: [PATCH] rolling_update: create crush rule after osd play When upgrading from jewel to luminous we can execute the crush rule tasks only when the 'osd require-osd-release luminous' command. Signed-off-by: Dimitri Savineau --- infrastructure-playbooks/rolling_update.yml | 13 +++++++++++++ roles/ceph-osd/tasks/main.yml | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) 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: