From b3266c5be2f88210589cfa56a5fe0a5092f79ee6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Mon, 23 Jul 2018 14:56:20 +0200 Subject: [PATCH] rolling_update: set osd sortbitwise MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- infrastructure-playbooks/rolling_update.yml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 60f76bde6..1991ab99f 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -325,6 +325,7 @@ health_osd_check_retries: 40 health_osd_check_delay: 30 upgrade_ceph_packages: True + jewel_minor_update: False hosts: - "{{ osd_group_name|default('osds') }}" @@ -387,6 +388,30 @@ 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 -- 2.39.5