Skip to content

Commit

Permalink
rgw: request that delete bucket website should be forward to master zone
Browse files Browse the repository at this point in the history
Signed-off-by: Chang Liu <[email protected]>
  • Loading branch information
liuchang0812 committed May 28, 2019
1 parent b9f4cb2 commit 52cb091
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2542,6 +2542,16 @@ void RGWDeleteBucketWebsite::pre_exec()

void RGWDeleteBucketWebsite::execute()
{

if (!store->svc.zone->is_meta_master()) {
bufferlist in_data;
op_ret = forward_request_to_master(s, nullptr, store, in_data, nullptr);
if (op_ret < 0) {
ldpp_dout(this, 0) << "NOTICE: forward_to_master failed on bucket=" << s->bucket.name
<< "returned err=" << op_ret << dendl;
return;
}
}
op_ret = retry_raced_bucket_write(store, s, [this] {
s->bucket_info.has_website = false;
s->bucket_info.website_conf = RGWBucketWebsiteConf();
Expand Down

0 comments on commit 52cb091

Please sign in to comment.