]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: set api_name if not provided in create_zonegroup 52791/head
authorSeena Fallah <seenafallah@gmail.com>
Thu, 19 Dec 2024 22:09:03 +0000 (23:09 +0100)
committerSeena Fallah <seenafallah@gmail.com>
Thu, 19 Dec 2024 22:09:03 +0000 (23:09 +0100)
If api_name is not set in the config, use name as the api_name,
otherwise on RGW it will be set to an empty string.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
qa/tasks/rgw_multisite.py

index e83a54efc2b4fcd0ec192d7ac226b0dce9849b99..f93ca017fa2d4d3b7c1f6e390349e9b394c080d7 100644 (file)
@@ -361,6 +361,8 @@ def create_zonegroup(cluster, gateways, period, config):
     if endpoints:
         # replace client names with their gateway endpoints
         config['endpoints'] = extract_gateway_endpoints(gateways, endpoints)
+    if not config.get('api_name'): # otherwise it will be set to an empty string
+        config['api_name'] = config['name']
     zonegroup = multisite.ZoneGroup(config['name'], period)
     # `zonegroup set` needs --default on command line, and 'is_master' in json
     args = is_default_arg(config)