]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix flight load_bucket call 54447/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 9 Nov 2023 21:40:45 +0000 (16:40 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Thu, 16 Nov 2023 16:45:31 +0000 (11:45 -0500)
The interface to the load_bucket call changed when tenant and bucket
name are specified and user is no longer required. This updates the
flight call to load_bucket to reflect those changes.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/rgw_flight.cc

index 7cc8a460dc4c266859432e1a1660154127cfdf61..955edcced89f0a8b9a13201eb8cc26e74ba78138 100644 (file)
@@ -673,6 +673,11 @@ arw::Status FlightServer::DoGet(const flt::ServerCallContext &context,
   ARROW_ASSIGN_OR_RAISE(FlightKey key, TicketToFlightKey(request));
   ARROW_ASSIGN_OR_RAISE(FlightData fd, get_flight_store()->get_flight(key));
 
+#if 0
+  /* load_bucket no longer requires a user parameter. Keep this code
+   * around a bit longer until we fully figure out how permissions
+   * will impact this code.
+   */
   std::unique_ptr<rgw::sal::User> user = driver->get_user(fd.user_id);
   if (user->empty()) {
     INFO << "user is empty" << dendl;
@@ -685,10 +690,11 @@ arw::Status FlightServer::DoGet(const flt::ServerCallContext &context,
     }
     INFO << "user is " << user->get_display_name() << dendl;
   }
+#endif
 
   std::unique_ptr<rgw::sal::Bucket> bucket;
-
-  ret = driver->load_bucket(&dp, &(*user), fd.tenant_name, fd.bucket_name,
+  ret = driver->load_bucket(&dp,
+                           rgw_bucket(fd.tenant_name, fd.bucket_name),
                             &bucket, null_yield);
   if (ret < 0) {
     ERROR << "get_bucket returned " << ret << dendl;