Make Get OSD stat percentage compatible with jq < 1.5
On upgrades we're using validations (from train) against controller that
are still on queens. On queens jq package is <1.5 and the "try" keyword
is not available.
This purpose of this change is to fix this validations getting rid of
"try-catch" in favour of "if-else" which works for 1.3+ < jq < 1.5.
Change-Id: Iddea0c21da194ef7cbe781d4fc4ad932f6fc2c14
Closes-Bug: #1889279
(cherry picked from commit 436671832b0ee8aed87ebd6c5ce45e18ec00710c)
Reviewed: https:/ /review. opendev. org/743572 /git.openstack. org/cgit/ openstack/ tripleo- validations/ commit/ ?id=5dcaa10e894 438fbc3b0cd6ba4 8a2407081d8613
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 5dcaa10e894438f bc3b0cd6ba48a24 07081d8613
Author: Francesco Pantano <email address hidden>
Date: Tue Jul 28 18:44:54 2020 +0200
Make Get OSD stat percentage compatible with jq < 1.5
On upgrades we're using validations (from train) against controller that
are still on queens. On queens jq package is <1.5 and the "try" keyword
is not available.
This purpose of this change is to fix this validations getting rid of
"try-catch" in favour of "if-else" which works for 1.3+ < jq < 1.5.
Change-Id: Iddea0c21da194e f7cbe781d4fc4ad 932f6fc2c14 ed87ebd6c5ce45e 18ec00710c)
Closes-Bug: #1889279
(cherry picked from commit 436671832b0ee8a