Skip to content

Commit

Permalink
rgw: add versioning status during radosgw-admin bucket stats
Browse files Browse the repository at this point in the history
We received an RFE to including versioning informatio during the
bucket stats op. So in the produced JSON, under "versioning", it will
specify "off", "enabled", or "suspended".

Signed-off-by: J. Eric Ivancich <[email protected]>
  • Loading branch information
ivancich committed Aug 16, 2023
1 parent 73272c9 commit ea2d7ff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rgw/driver/rados/rgw_bucket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ static int bucket_stats(rgw::sal::Driver* driver,
formatter->dump_int("num_shards",
bucket->get_info().layout.current_index.layout.normal.num_shards);
formatter->dump_string("tenant", bucket->get_tenant());
formatter->dump_string("versioning", bucket->versioned() ? (bucket->versioning_enabled() ? "enabled" : "suspended") : "off");
formatter->dump_string("zonegroup", bucket->get_info().zonegroup);
formatter->dump_string("placement_rule", bucket->get_info().placement_rule.to_str());
::encode_json("explicit_placement", bucket->get_key().explicit_placement, formatter);
Expand Down

0 comments on commit ea2d7ff

Please sign in to comment.