File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ The log bucket can accumulate logs from multiple buckets. It is recommended to c
1515a different "prefix" for each bucket, so that the logs of different buckets will be stored
1616in different objects in the log bucket.
1717
18+ .. note ::
19+
20+ - The log bucket must be created before enabling logging on a bucket
21+ - The log bucket cannot be the same as the bucket being logged
22+ - The log bucket cannot have logging enabled on it
23+
1824
1925.. toctree ::
2026 :maxdepth: 1
Original file line number Diff line number Diff line change @@ -181,6 +181,11 @@ class RGWPutBucketLoggingOp : public RGWDefaultResponseOp {
181181 return ;
182182 }
183183 const rgw_bucket target_bucket_id (target_tenant_name, target_bucket_name);
184+ if (target_bucket_id == src_bucket_id) {
185+ ldpp_dout (this , 1 ) << " ERROR: target bucket '" << target_bucket_id << " ' must be different from source bucket" << dendl;
186+ op_ret = -EINVAL;
187+ return ;
188+ }
184189 std::unique_ptr<rgw::sal::Bucket> target_bucket;
185190 op_ret = driver->load_bucket (this , target_bucket_id,
186191 &target_bucket, y);
You can’t perform that action at this time.
0 commit comments