diff options
author | Casey Bodley <cbodley@redhat.com> | 2019-09-05 21:50:26 +0200 |
---|---|---|
committer | Casey Bodley <cbodley@redhat.com> | 2019-09-17 14:19:28 +0200 |
commit | c9aac91b186e3649c2dd79263f5cdf1b1229bd9b (patch) | |
tree | 20c5aa8e396c449ce4c44a0b84d7baf1a7d41305 /qa/tasks/ragweed.py | |
parent | qa/rgw: fix for extra_args in s3tests task (diff) | |
download | ceph-c9aac91b186e3649c2dd79263f5cdf1b1229bd9b.tar.xz ceph-c9aac91b186e3649c2dd79263f5cdf1b1229bd9b.zip |
qa/ragweed: use correct endpoint from rgw_server
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'qa/tasks/ragweed.py')
-rw-r--r-- | qa/tasks/ragweed.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/qa/tasks/ragweed.py b/qa/tasks/ragweed.py index b3bcf1f92e5..ad424f3b568 100644 --- a/qa/tasks/ragweed.py +++ b/qa/tasks/ragweed.py @@ -200,18 +200,6 @@ def configure(ctx, config, run_stages): continue ragweed_conf = config['ragweed_conf'][client] - if properties is not None and 'rgw_server' in properties: - host = None - for target, roles in zip(ctx.config['targets'].iterkeys(), ctx.config['roles']): - log.info('roles: ' + str(roles)) - log.info('target: ' + str(target)) - if properties['rgw_server'] in roles: - _, host = split_user(target) - assert host is not None, "Invalid client specified as the rgw_server" - ragweed_conf['rgw']['host'] = host - else: - ragweed_conf['rgw']['host'] = 'localhost' - if properties is not None and 'slow_backend' in properties: ragweed_conf['fixtures']['slow backend'] = properties['slow_backend'] @@ -347,14 +335,18 @@ def task(ctx, config): ragweed_conf = {} for client in clients: - endpoint = ctx.rgw.role_endpoints.get(client) - assert endpoint, 'ragweed: no rgw endpoint for {}'.format(client) + # use rgw_server endpoint if given, or default to same client + target = config[client].get('rgw_server', client) + + endpoint = ctx.rgw.role_endpoints.get(target) + assert endpoint, 'ragweed: no rgw endpoint for {}'.format(target) ragweed_conf[client] = ConfigObj( indent_type='', infile={ 'rgw': { + 'host' : endpoint.dns_name, 'port' : endpoint.port, 'is_secure' : endpoint.cert is not None, }, |