]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/s3readwrite.py
import 14.2.4 nautilus point release
[ceph.git] / ceph / qa / tasks / s3readwrite.py
index 9f1507ef8167de88db2995262985bbf1048f7fd1..6f98e59b073348d59485d1d35c82429c66ae25d9 100644 (file)
@@ -293,9 +293,10 @@ def task(ctx, config):
                 secret_key: mysecretkey
 
     """
+    assert hasattr(ctx, 'rgw'), 's3readwrite must run after the rgw task'
     assert config is None or isinstance(config, list) \
         or isinstance(config, dict), \
-        "task s3tests only supports a list or dictionary for configuration"
+        "task s3readwrite only supports a list or dictionary for configuration"
     all_clients = ['client.{id}'.format(id=id_)
                    for id_ in teuthology.all_roles_of_type(ctx.cluster, 'client')]
     if config is None:
@@ -319,12 +320,14 @@ def task(ctx, config):
             config[client] = {}
         config[client].setdefault('s3', {})
         config[client].setdefault('readwrite', {})
+        endpoint = ctx.rgw.role_endpoints.get(client)
+        assert endpoint, 's3readwrite: no rgw endpoint for {}'.format(client)
 
         s3tests_conf[client] = ({
                 'DEFAULT':
                     {
-                    'port'      : 7280,
-                    'is_secure' : False,
+                    'port'      : endpoint.port,
+                    'is_secure' : endpoint.cert is not None,
                     },
                 'readwrite' : config[client]['readwrite'],
                 's3'  : config[client]['s3'],