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
This commit is contained in:
Xav Paice 2017-05-04 20:45:03 +12:00
parent 59f113d912
commit 1add343574
1 changed files with 4 additions and 4 deletions

View File

@ -2059,14 +2059,14 @@ def get_ceph_pg_stat():
def get_ceph_health(): 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 :return: dict
Also raises CalledProcessError if our ceph command fails Also raises CalledProcessError if our ceph command fails
To get the overall status, use get_ceph_health()['overall_status'] To get the overall status, use get_ceph_health()['overall_status']
""" """
try: try:
tree = check_output( tree = check_output(
['ceph', 'health', '--format=json']) ['ceph', 'status', '--format=json'])
try: try:
json_tree = json.loads(tree) json_tree = json.loads(tree)
# Make sure children are present in the json # Make sure children are present in the json
@ -2078,7 +2078,7 @@ def get_ceph_health():
tree, v.message)) tree, v.message))
raise raise
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
log("ceph osd tree command failed with message: {}".format( log("ceph status command failed with message: {}".format(
e.message)) e.message))
raise raise
@ -2102,6 +2102,6 @@ def reweight_osd(osd_num, new_weight):
return True return True
return False return False
except subprocess.CalledProcessError as e: 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)) e.message))
raise raise