]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: for the create_bucket api, if the input creation_time is zero, we should set... 11990/head
authorweiqiaomiao <wei.qiaomiao@zte.com.cn>
Mon, 4 Jul 2016 10:16:39 +0000 (18:16 +0800)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Wed, 16 Nov 2016 11:03:21 +0000 (14:03 +0300)
Fixes: http://tracker.ceph.com/issues/16597
Signed-off-by: weiqiaomiao <wei.qiaomiao@zte.com.cn>
(cherry picked from commit 499c0e95a58bb7bd2326ea74761ea98449d26d3b)

Conflicts:
src/rgw/rgw_rados.cc - apply the one-liner patch manually

src/rgw/rgw_rados.cc

index 134e7e56ea04762d2b5c6681fc27c09011ca1a78..daddebe45775286562b5ab19b08c6ca558d59af5 100644 (file)
@@ -5159,7 +5159,7 @@ int RGWRados::create_bucket(RGWUserInfo& owner, rgw_bucket& bucket,
     info.bucket_index_shard_hash_type = RGWBucketInfo::MOD;
     info.requester_pays = false;
     if (real_clock::is_zero(creation_time))
-      creation_time = ceph::real_clock::now(cct);
+      info.creation_time = ceph::real_clock::now(cct);
     else
       info.creation_time = creation_time;
     ret = put_linked_bucket_info(info, exclusive, ceph::real_time(), pep_objv, &attrs, true);