From b9f78052035ab7e8a58b6b77e8d6c4fbe8abef0c Mon Sep 17 00:00:00 2001 From: Facundo Ciccioli Date: Fri, 10 Mar 2023 18:02:34 +0100 Subject: [PATCH] Fix Nagios additional checks functionality Commit 40b22e3d on juju/charm-helpers repo introduced shell quoting of each argument passed to the check, turning the quoting of the double quotes done here not only unnecessary but also damaging to the final command. Closes-Bug: #2008784 Change-Id: Ifedd5875d27e72a857b01a48afcd058476734695 func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/1022 --- src/ceph_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph_hooks.py b/src/ceph_hooks.py index 01cca64e..5f9b2a11 100755 --- a/src/ceph_hooks.py +++ b/src/ceph_hooks.py @@ -1167,7 +1167,7 @@ def update_nrpe_config(): name = "ceph-{}".format(key.replace(" ", "")) log("Adding check {}".format(name)) check_cmd = 'check_ceph_status.py -f {}' \ - ' --additional_check \\\"{}\\\"' \ + ' --additional_check \"{}\"' \ ' {}'.format(STATUS_FILE, value, "--additional_check_critical" if additional_critical is True else "")