From 14d25dca343c73108dcd6a04d9695b82d4719a63 Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Mon, 2 Jul 2018 16:03:12 +0300 Subject: [PATCH] rgw: radogw-admin reshard status command should print text for reshard status Fixes: http://tracker.ceph.com/issues/23257 Signed-off-by: Orit Wasserman --- src/cls/rgw/cls_rgw_types.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/cls/rgw/cls_rgw_types.cc b/src/cls/rgw/cls_rgw_types.cc index 223d165547c..9bec682bcce 100644 --- a/src/cls/rgw/cls_rgw_types.cc +++ b/src/cls/rgw/cls_rgw_types.cc @@ -664,7 +664,21 @@ void cls_rgw_reshard_entry::generate_test_instances(list void cls_rgw_bucket_instance_entry::dump(Formatter *f) const { - encode_json("reshard_status", (int)reshard_status, f); + string status_str; + switch(reshard_status) { + case CLS_RGW_RESHARD_NONE: + status_str= "none"; + break; + case CLS_RGW_RESHARD_IN_PROGRESS: + status_str = "in-progress"; + break; + case CLS_RGW_RESHARD_DONE: + status_str = "done"; + break; + default: + status_str = "invalid"; + } + encode_json("reshard_status", status_str, f); encode_json("new_bucket_instance_id", new_bucket_instance_id, f); encode_json("num_shards", num_shards, f);