mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
qa/rgw: swift task looks for rgw_server endpoint
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
24ccb2f857
commit
5e667c4f73
@ -127,19 +127,6 @@ def configure(ctx, config):
|
||||
log.info('client={c}'.format(c=client))
|
||||
log.info('config={c}'.format(c=config))
|
||||
testswift_conf = config['testswift_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"
|
||||
testswift_conf['func_test']['auth_host'] = host
|
||||
else:
|
||||
testswift_conf['func_test']['auth_host'] = 'localhost'
|
||||
|
||||
log.info(client)
|
||||
(remote,) = ctx.cluster.only(client).remotes.keys()
|
||||
remote.run(
|
||||
args=[
|
||||
@ -235,10 +222,7 @@ def task(ctx, config):
|
||||
|
||||
testswift_conf = {}
|
||||
clients = []
|
||||
for client in config.keys():
|
||||
endpoint = ctx.rgw.role_endpoints.get(client)
|
||||
assert endpoint, 'swift: no rgw endpoint for {}'.format(client)
|
||||
|
||||
for client, client_config in config.iteritems():
|
||||
# http://tracker.ceph.com/issues/40304 can't bootstrap on rhel 7.6+
|
||||
(remote,) = ctx.cluster.only(client).remotes.keys()
|
||||
if remote.os.name == 'rhel' and LooseVersion(remote.os.version) >= LooseVersion('7.6'):
|
||||
@ -247,12 +231,17 @@ def task(ctx, config):
|
||||
|
||||
clients.append(client)
|
||||
|
||||
server = client_config.get('rgw_server', client)
|
||||
endpoint = ctx.rgw.role_endpoints.get(server)
|
||||
assert endpoint, 'swift: no rgw endpoint for {}'.format(server)
|
||||
|
||||
testswift_conf[client] = ConfigObj(
|
||||
indent_type='',
|
||||
infile={
|
||||
'func_test':
|
||||
{
|
||||
'auth_port' : endpoint.port,
|
||||
'auth_host' : endpoint.hostname,
|
||||
'auth_port' : endpoint.port,
|
||||
'auth_ssl' : 'yes' if endpoint.cert else 'no',
|
||||
'auth_prefix' : '/auth/',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user