]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RadosGW: RGW Swift info not providing max_deletes_per_request in bulk_delete section 54050/head
authorshreyanshjain7174 <ssanchet@redhat.com>
Tue, 17 Oct 2023 06:55:42 +0000 (08:55 +0200)
committershreyanshjain7174 <ssanchet@redhat.com>
Tue, 17 Oct 2023 06:55:42 +0000 (08:55 +0200)
RGW implements the info endpoint for the Swift protocol which presents a key knowns as bulk_delete, but upon doing swift info the max_deletes_per_request is not shown which is necessary for user to ge the information of a global paramter rgw_delete_multi_obj_max_num in radosgw.

Fixes: https://tracker.ceph.com/issues/62646
Signed-off-by: shreyanshjain7174 <ssanchet@redhat.com>
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_rest_swift.h

index 1f9657111599eb7a563f73e95f634e3beaeba66c..6efc7bd8e1cb79c6b02efae2abd149e4a15124df 100644 (file)
@@ -1818,7 +1818,7 @@ void RGWGetHealthCheck_ObjStore_SWIFT::send_response()
 
 const vector<pair<string, RGWInfo_ObjStore_SWIFT::info>> RGWInfo_ObjStore_SWIFT::swift_info =
 {
-    {"bulk_delete", {false, nullptr}},
+    {"bulk_delete", {false, RGWInfo_ObjStore_SWIFT::list_bulk_delete}},
     {"container_quotas", {false, nullptr}},
     {"swift", {false, RGWInfo_ObjStore_SWIFT::list_swift_data}},
     {"tempurl", { false, RGWInfo_ObjStore_SWIFT::list_tempurl_data}},
@@ -1870,6 +1870,16 @@ void RGWInfo_ObjStore_SWIFT::send_response()
   rgw_flush_formatter_and_reset(s, s->formatter);
 }
 
+void RGWInfo_ObjStore_SWIFT::list_bulk_delete(Formatter& formatter,
+                                                const ConfigProxy& config,
+                                                rgw::sal::Driver* driver)
+{
+  formatter.open_object_section("bulk_delete");
+  formatter.dump_int("max_deletes_per_request", config->rgw_delete_multi_obj_max_num); 
+  formatter.close_section();
+
+}
+
 void RGWInfo_ObjStore_SWIFT::list_swift_data(Formatter& formatter,
                                               const ConfigProxy& config,
                                               rgw::sal::Driver* driver)
index 25b20a9700d1ee7480e08dc3ebb38db35a0255be..08b5a77dabbe4375ac82fc4b65d10d6f35d34472 100644 (file)
@@ -238,6 +238,7 @@ public:
 
   void execute(optional_yield y) override;
   void send_response() override;
+  static void list_bulk_delete(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver);
   static void list_swift_data(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver);
   static void list_tempauth_data(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver);
   static void list_tempurl_data(Formatter& formatter, const ConfigProxy& config, rgw::sal::Driver* driver);