Merge "Fix typos in ceph health method"
This commit is contained in:
commit
7ed769c05c
|
@ -2060,14 +2060,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
|
||||
|
@ -2079,7 +2079,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
|
||||
|
||||
|
@ -2103,7 +2103,7 @@ 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue