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 <dsavinea@redhat.com>
pull/4727/head
Dimitri Savineau 2019-11-18 11:07:16 -05:00 committed by Guillaume Abrioux
parent af57597df6
commit 8b2659bf6d
2 changed files with 16 additions and 1 deletions

View File

@ -461,6 +461,19 @@
- ceph_versions_osd | string is search("ceph version 12") - 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 - name: upgrade ceph mdss cluster, deactivate all rank > 0
hosts: "{{ groups[mon_group_name|default('mons')][0] }}" hosts: "{{ groups[mon_group_name|default('mons')][0] }}"
become: true become: true

View File

@ -91,7 +91,9 @@
- name: include crush_rules.yml - name: include crush_rules.yml
include_tasks: 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 - name: set_fact openstack_keys_tmp - preserve backward compatibility after the introduction of the ceph_keys module
set_fact: set_fact: