]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rolling_update: set osd sortbitwise v3.0.40
authorSébastien Han <seb@redhat.com>
Mon, 23 Jul 2018 12:56:20 +0000 (14:56 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Tue, 31 Jul 2018 22:26:12 +0000 (22:26 +0000)
upgrade RHCS 2 -> RHCS 3 will fail if cluster has still set
sortnibblewise,
it stay stuck on "TASK [waiting for clean pgs...]" as RHCS 3 osds will
not start if nibblewise is set.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1600943
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit b3266c5be2f88210589cfa56a5fe0a5092f79ee6)

infrastructure-playbooks/rolling_update.yml

index 23396b27a48fda14909b35dc53dc37b5f1d56e47..f01168a97cabebb6028e246e5d4a2ee9fd84dac7 100644 (file)
     health_osd_check_retries: 40
     health_osd_check_delay: 30
     upgrade_ceph_packages: True
+    jewel_minor_update: False
 
   hosts:
     - "{{ osd_group_name|default('osds') }}"
       when:
         - containerized_deployment
 
+    - name: get osd versions
+      command: "{{ docker_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} versions"
+      register: ceph_versions
+      delegate_to: "{{ groups[mon_group_name][0] }}"
+      when:
+        - not jewel_minor_update
+
+    - name: set_fact ceph_versions_osd
+      set_fact:
+        ceph_versions_osd: "{{ (ceph_versions.stdout|from_json).osd }}"
+      delegate_to: "{{ groups[mon_group_name][0] }}"
+      when:
+        - not jewel_minor_update
+
+    # length == 1 means there is a single osds versions entry
+    # thus all the osds are running the same version
+    - name: osd set sortbitwise
+      command: "{{ docker_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} osd set sortbitwise"
+      delegate_to: "{{ groups[mon_group_name][0] }}"
+      when:
+        - (ceph_versions.get('stdout', '{}')|from_json).get('osd', {}) | length == 1
+        - ceph_versions_osd | string | search("ceph version 12")
+        - not jewel_minor_update
+
     - name: get num_pgs - non container
       command: "{{ docker_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} -s --format json"
       register: ceph_pgs