From 1add3435742f1ec882cf891b9834a91334a3cb0c Mon Sep 17 00:00:00 2001 From: Xav Paice Date: Thu, 4 May 2017 20:45:03 +1200 Subject: [PATCH] Fix typos in ceph health method Fix the errors in the log message. Change ceph health to be ceph status - which has more info, and is compatible in current usage. Change-Id: I3bed0a3e87bb3fdf98266a91757ad39bfc58337e --- ceph/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ceph/__init__.py b/ceph/__init__.py index f29adfc..7f1818d 100644 --- a/ceph/__init__.py +++ b/ceph/__init__.py @@ -2059,14 +2059,14 @@ def get_ceph_pg_stat(): def get_ceph_health(): """ - Returns the health of the cluster from a 'ceph health' + Returns the health of the cluster from a 'ceph status' :return: dict Also raises CalledProcessError if our ceph command fails To get the overall status, use get_ceph_health()['overall_status'] """ try: tree = check_output( - ['ceph', 'health', '--format=json']) + ['ceph', 'status', '--format=json']) try: json_tree = json.loads(tree) # Make sure children are present in the json @@ -2078,7 +2078,7 @@ def get_ceph_health(): tree, v.message)) raise except subprocess.CalledProcessError as e: - log("ceph osd tree command failed with message: {}".format( + log("ceph status command failed with message: {}".format( e.message)) raise @@ -2102,6 +2102,6 @@ def reweight_osd(osd_num, new_weight): return True return False except subprocess.CalledProcessError as e: - log("ceph osd tree command failed with message: {}".format( + log("ceph osd crush reweight command failed with message: {}".format( e.message)) raise