]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
osd: do not run openstack_config during upgrade
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 8 Nov 2019 15:21:54 +0000 (16:21 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 13 Jan 2020 14:59:08 +0000 (09:59 -0500)
There is no need to run this part of the playbook when upgrading the
cluter.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-osd/tasks/main.yml

index 4bf8457702397f75f66f97be08db10d3afec389c..79ac50fcebf7c2b3aac78a4162610eacfba58f1f 100644 (file)
 - 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
   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
     - 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