Merge pull request #30384 from ZVampirEM77/bucket-create-time

rgw: add creation time information into bucket stats

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2019-09-19 14:15:33 -04:00 committed by GitHub
commit c18db0c40b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1318,6 +1318,7 @@ static int bucket_stats(RGWRadosStore *store, const std::string& tenant_name, st
}
utime_t ut(mtime);
utime_t ctime_ut(bucket_info.creation_time);
formatter->open_object_section("stats");
formatter->dump_string("bucket", bucket.name);
@ -1332,6 +1333,7 @@ static int bucket_stats(RGWRadosStore *store, const std::string& tenant_name, st
formatter->dump_string("ver", bucket_ver);
formatter->dump_string("master_ver", master_ver);
ut.gmtime(formatter->dump_stream("mtime"));
ctime_ut.gmtime(formatter->dump_stream("creation_time"));
formatter->dump_string("max_marker", max_marker);
dump_bucket_usage(stats, formatter);
encode_json("bucket_quota", bucket_info.quota, formatter);