]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: send self zonegroup on forward to master 60254/head
authorSeena Fallah <seenafallah@gmail.com>
Mon, 19 Aug 2024 12:15:59 +0000 (14:15 +0200)
committerSeena Fallah <seenafallah@gmail.com>
Fri, 22 Nov 2024 22:03:51 +0000 (23:03 +0100)
When creating a bucket in the secondary zonegroup, the `rgwx-zonegroup`
is mistakenly set to the master zonegroup when forwarding the request.
Instead, it should be set to the secondary zonegroup so that the master
zonegroup creates the bucket for the intended zonegroup rather than
for itself.

Fixes: https://tracker.ceph.com/issues/67610
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
src/rgw/rgw_op.cc

index 67829e6320a6ea73fd4689ab01c6fba42c41b47d..561e303beaeae9361acd9bb76cbc2b7a6b2c8a36 100644 (file)
@@ -148,7 +148,7 @@ int rgw_forward_request_to_master(const DoutPrefixProvider* dpp,
 
   // use the master zone's endpoints
   auto conn = RGWRESTConn{dpp->get_cct(), z->second.id, z->second.endpoints,
-                          creds, zg->second.id, zg->second.api_name};
+                          creds, site.get_zonegroup().id, zg->second.api_name};
   bufferlist outdata;
   constexpr size_t max_response_size = 128 * 1024; // we expect a very small response
   int ret = conn.forward(dpp, effective_owner, req, nullptr,