From 4c4b0edfec67c80aead0928b1568d5a4722f9c6e Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 18 Nov 2019 18:12:00 +0100 Subject: [PATCH] update: only run post osd upgrade play on 1 mon There is no need to run these tasks n times from each monitor. Signed-off-by: Guillaume Abrioux (cherry picked from commit c878e99589bde0eecb8ac72a7ec8bc1f66403eeb) --- infrastructure-playbooks/rolling_update.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 0544ab147..9c698a7d2 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -506,10 +506,8 @@ when: (ceph_pgs.stdout | from_json).pgmap.num_pgs != 0 -- name: unset osd flags - - hosts: "{{ mon_group_name|default('mons') }}" - +- name: complete osd upgrade + hosts: "{{ mon_group_name|default('mons') }}[0]" become: True tasks: @@ -532,18 +530,15 @@ - name: get osd versions command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} versions" register: ceph_versions - delegate_to: "{{ groups[mon_group_name][0] }}" - name: set_fact ceph_versions_osd set_fact: ceph_versions_osd: "{{ (ceph_versions.stdout|from_json).osd }}" - delegate_to: "{{ groups[mon_group_name][0] }}" # length == 1 means there is a single osds versions entry # thus all the osds are running the same version - name: complete osds upgrade command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} osd require-osd-release luminous" - delegate_to: "{{ groups[mon_group_name][0] }}" when: - (ceph_versions.get('stdout', '{}')|from_json).get('osd', {}) | length == 1 - ceph_versions_osd | string is search("ceph version 12") -- 2.39.5