From: Guillaume Abrioux Date: Fri, 8 Nov 2019 15:21:54 +0000 (+0100) Subject: osd: do not run openstack_config during upgrade X-Git-Tag: v6.0.0alpha1~122 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af6875706af93f133299156403f51d3ad48d17d3;p=ceph-ansible.git osd: do not run openstack_config during upgrade There is no need to run this part of the playbook when upgrading the cluter. Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-osd/tasks/main.yml b/roles/ceph-osd/tasks/main.yml index 4bf845770..79ac50fce 100644 --- a/roles/ceph-osd/tasks/main.yml +++ b/roles/ceph-osd/tasks/main.yml @@ -54,6 +54,14 @@ - name: include_tasks start_osds.yml include_tasks: start_osds.yml +- name: unset noup flag + command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup" + delegate_to: "{{ groups[mon_group_name][0] }}" + changed_when: False + when: + - not rolling_update | default(False) | bool + - inventory_hostname == ansible_play_hosts_all | last + - name: wait for all osd to be up command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} -s -f json" register: wait_for_all_osds_up @@ -61,10 +69,11 @@ delay: "{{ delay_wait_osd_up }}" changed_when: false delegate_to: "{{ groups[mon_group_name][0] }}" - run_once: true until: - (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] | int > 0 - (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_osds"] == (wait_for_all_osds_up.stdout | from_json)["osdmap"]["num_up_osds"] + when: + - inventory_hostname == ansible_play_hosts_all | last - name: include crush_rules.yml include_tasks: crush_rules.yml @@ -87,18 +96,11 @@ - not add_osd | bool - openstack_keys_tmp is defined -- name: unset noup flag - command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup" - delegate_to: "{{ groups[mon_group_name][0] }}" - changed_when: False - when: - - not rolling_update | default(False) | bool - - inventory_hostname == ansible_play_hosts_all | last - # Create the pools listed in openstack_pools - name: include openstack_config.yml include_tasks: openstack_config.yml when: - not add_osd | bool + - not rolling_update | default(False) | bool - openstack_config | bool - inventory_hostname == groups[osd_group_name] | last