From f97940e6ad9dd41327b1f6d33b39a9c93505365d Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Wed, 1 Jul 2020 16:18:16 +0200 Subject: [PATCH] Make Get OSD stat percentage compatible with both Luminous and Nautilus On upgrade we might be using the newer validations against a Luminous cluster, hence the check needs to work in both cases. Depends-On: Id20ee6bf069f53739f7a5ea7983edf2fc9b445d2 Change-Id: I16e7eb081640332ac69ee0b32d3d871fab40d447 Related-Bug: 1882387 (cherry picked from commit 35821c44dfe448ae6a381ee873e3945ab899e431) --- roles/ceph/tasks/ceph-health.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph/tasks/ceph-health.yaml b/roles/ceph/tasks/ceph-health.yaml index 5bc504536..28b903f82 100644 --- a/roles/ceph/tasks/ceph-health.yaml +++ b/roles/ceph/tasks/ceph-health.yaml @@ -65,7 +65,7 @@ block: - name: set jq osd percentage filter set_fact: - jq_osd_percentage_filter: '( (.osdmap.num_in_osds) / (.osdmap.num_osds) ) * 100' + jq_osd_percentage_filter: '( (try .osdmap.num_in_osds + try .num_in_osds) / (try .osdmap.num_osds + try .num_osds)) * 100' - name: Get OSD stat percentage become: true