Skip to content

Commit

Permalink
rgw: Return tenant field in bucket_stats function
Browse files Browse the repository at this point in the history
Fixes: https://tracker.ceph.com/issues/38800 and https://tracker.ceph.com/issues/36681

(cherry picked from commit 9440776)
Signed-off-by: Volker Theile <vtheile@suse.com>
  • Loading branch information
votdev committed May 22, 2019
1 parent 2bb04a3 commit e511093
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions qa/tasks/radosgw_admin_rest.py
Expand Up @@ -404,6 +404,7 @@ def task(ctx, config):

assert ret == 200
assert out['owner'] == user1
assert out['tenant'] == ''
bucket_id = out['id']

# TESTCASE 'bucket-stats4','bucket','stats','new empty bucket','succeeds, expected bucket ID'
Expand Down
1 change: 1 addition & 0 deletions src/rgw/rgw_bucket.cc
Expand Up @@ -1432,6 +1432,7 @@ static int bucket_stats(RGWRados *store, const std::string& tenant_name, std::st

formatter->open_object_section("stats");
formatter->dump_string("bucket", bucket.name);
formatter->dump_string("tenant", bucket.tenant);
formatter->dump_string("zonegroup", bucket_info.zonegroup);
formatter->dump_string("placement_rule", bucket_info.placement_rule);
::encode_json("explicit_placement", bucket.explicit_placement, formatter);
Expand Down

0 comments on commit e511093

Please sign in to comment.