mirror of
https://github.com/ceph/ceph
synced 2025-01-20 10:01:45 +00:00
rgw: fix json decoding of rgw_bucket
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
parent
8bb5e0a2ef
commit
8bab4fe043
@ -851,7 +851,6 @@ void RGWCreateBucket::execute()
|
||||
|
||||
s->bucket_owner.set_id(s->user.user_id);
|
||||
s->bucket_owner.set_name(s->user.display_name);
|
||||
|
||||
r = get_policy_from_attr(s->cct, store, s->obj_ctx, &old_policy, obj);
|
||||
if (r >= 0) {
|
||||
if (old_policy.get_owner().get_id().compare(s->user.user_id) != 0) {
|
||||
|
@ -145,7 +145,7 @@ int RGWRegion::init(CephContext *_cct, RGWRados *_store, bool setup_region)
|
||||
|
||||
string region_name = cct->_conf->rgw_region;
|
||||
|
||||
if (name.empty()) {
|
||||
if (region_name.empty()) {
|
||||
RGWDefaultRegionInfo default_info;
|
||||
int r = read_default(default_info);
|
||||
if (r == -ENOENT) {
|
||||
@ -159,10 +159,10 @@ int RGWRegion::init(CephContext *_cct, RGWRados *_store, bool setup_region)
|
||||
lderr(cct) << "failed reading default region info: " << cpp_strerror(-r) << dendl;
|
||||
return r;
|
||||
}
|
||||
string region_name = default_info.default_region;
|
||||
region_name = default_info.default_region;
|
||||
}
|
||||
|
||||
return read_info(name);
|
||||
return read_info(region_name);
|
||||
}
|
||||
|
||||
int RGWRegion::read_info(const string& region_name)
|
||||
@ -1148,7 +1148,6 @@ int RGWRados::create_bucket(string& owner, rgw_bucket& bucket,
|
||||
bool exclusive)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ret = select_bucket_placement(bucket.name, bucket);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user