]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: allow rgw client config to override port
authorCasey Bodley <cbodley@redhat.com>
Tue, 20 Feb 2018 16:23:00 +0000 (11:23 -0500)
committerNathan Cutler <ncutler@suse.com>
Wed, 24 Jul 2019 13:28:58 +0000 (15:28 +0200)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 921faebb723c11686bf790ca424c952a786f358a)

qa/tasks/rgw.py

index 26a174e4e2623f525a2d82a6e5189c599763093d..545a0f82381703310363caff58b5ca80cd3bc3ae 100644 (file)
@@ -164,9 +164,8 @@ def assign_endpoints(ctx, config, default_cert):
     """
     Assign port numbers starting with port 7280.
     """
-    port = 7280
+    next_port = 7280
     role_endpoints = {}
-
     for role, client_config in config.iteritems():
         client_config = client_config or {}
         remote = get_remote_for_role(ctx, role)
@@ -182,8 +181,12 @@ def assign_endpoints(ctx, config, default_cert):
         else:
             ssl_certificate = None
 
+        port = client_config.get('port')
+        if not port:
+            port = next_port
+            next_port += 1
+
         role_endpoints[role] = RGWEndpoint(remote.hostname, port, ssl_certificate)
-        port += 1
 
     return role_endpoints