mirror of
https://github.com/ceph/ceph
synced 2025-04-11 04:02:04 +00:00
rgw/qa: Run tests on multiple cloudtier config
Run cloudtier tests with parameter 'retain_head_object' set to true and false. However having multiple cloudtier storage classes in the same task is increasing the transition time and resulting in spurious failures. Hence until there is a consistent way of running the tests, without having to depend on lc_debug_interval, disabled one of the config for now. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
This commit is contained in:
parent
f846f6ff02
commit
fa86d2ea42
@ -1,2 +1,3 @@
|
||||
roles:
|
||||
- [mon.a, osd.0, osd.1, osd.2, mgr.0, client.0, client.1]
|
||||
#- [mon.b, osd.3, osd.4, osd.5, mgr.1, client.2, client.3]
|
||||
|
@ -7,26 +7,56 @@ tasks:
|
||||
port: 8000
|
||||
client.1:
|
||||
port: 8001
|
||||
#client.2:
|
||||
#port: 8002
|
||||
#client.3:
|
||||
#port: 8003
|
||||
- rgw-cloudtier:
|
||||
client.0:
|
||||
# cloudtier storage class params
|
||||
cloud_storage_class: CLOUDTIER
|
||||
# retain_head_object = false
|
||||
cloud_storage_class: CLOUDTIER-CLIENT0
|
||||
cloud_client: client.1
|
||||
cloud_regular_storage_class: LUKEWARM
|
||||
cloud_target_storage_class: FROZEN
|
||||
cloud_retain_head_object: "true"
|
||||
cloud_target_path: "teuthology"
|
||||
cloud_retain_head_object: "false"
|
||||
cloud_target_path: "teuthology-client0"
|
||||
cloudtier_user:
|
||||
# cloud-user creds to be created on cloud-client
|
||||
cloud_secret: "abcefgh"
|
||||
cloud_access_key: "12345678"
|
||||
#client.2:
|
||||
# cloudtier storage class params
|
||||
# retain_head_object = true
|
||||
#
|
||||
# Having multiple cloudtier storage classes
|
||||
# in the same task is increasing the transition
|
||||
# time and resulting in spurious failures.
|
||||
# Hence disabling this until there is a
|
||||
# consistent way of running the tests
|
||||
# without having to depend on lc_debug_interval.
|
||||
#
|
||||
#cloud_storage_class: CLOUDTIER-CLIENT2
|
||||
#cloud_client: client.3
|
||||
#cloud_regular_storage_class: LUKEWARM
|
||||
#cloud_retain_head_object: "true"
|
||||
#cloud_target_path: "teuthology-client2"
|
||||
#cloudtier_user:
|
||||
# cloud-user creds to be created on cloud-client
|
||||
#cloud_secret: "foobar"
|
||||
#cloud_access_key: "87654321"
|
||||
- s3tests:
|
||||
client.0:
|
||||
force-repo: https://github.com/soumyakoduri/s3-tests.git
|
||||
git_remote: https://github.com/soumyakoduri/
|
||||
force-branch: cloudtier_tests
|
||||
force-branch: ceph-master
|
||||
rgw_server: client.0
|
||||
storage classes: LUKEWARM, FROZEN
|
||||
extra_attrs: ["cloud_transition"]
|
||||
lc_debug_interval: 10
|
||||
cloudtier_tests: True
|
||||
#client.2:
|
||||
#force-branch: ceph-master
|
||||
#rgw_server: client.2
|
||||
#storage classes: LUKEWARM, FROZEN
|
||||
#extra_attrs: ["cloud_transition"]
|
||||
#lc_debug_interval: 10
|
||||
#cloudtier_tests: True
|
||||
|
@ -213,7 +213,7 @@ def start_rgw(ctx, config, clients):
|
||||
stdin=run.PIPE,
|
||||
wait=False,
|
||||
)
|
||||
|
||||
|
||||
# XXX: add_daemon() doesn't let us wait until radosgw finishes startup
|
||||
for client in clients:
|
||||
endpoint = ctx.rgw.role_endpoints[client]
|
||||
|
@ -2,14 +2,10 @@
|
||||
rgw_cloudtier configuration routines
|
||||
"""
|
||||
import argparse
|
||||
import contextlib
|
||||
import logging
|
||||
|
||||
from teuthology.orchestra import run
|
||||
from teuthology import misc as teuthology
|
||||
from teuthology import contextutil
|
||||
from teuthology.exceptions import ConfigError
|
||||
from tasks.util import get_remote_for_role
|
||||
from tasks.util.rgw import rgwadmin, wait_for_radosgw
|
||||
from teuthology.task import Task
|
||||
|
||||
@ -67,7 +63,6 @@ class RGWCloudTier(Task):
|
||||
cloud_storage_class = client_config.get('cloud_storage_class')
|
||||
cloud_target_path = client_config.get('cloud_target_path')
|
||||
cloud_target_storage_class = client_config.get('cloud_target_storage_class')
|
||||
cloud_regular_storage_class = client_config.get('cloud_regular_storage_class')
|
||||
cloud_retain_head_object = client_config.get('cloud_retain_head_object')
|
||||
|
||||
cloudtier_user = client_config.get('cloudtier_user')
|
||||
@ -103,9 +98,11 @@ class RGWCloudTier(Task):
|
||||
check_status=True)
|
||||
|
||||
## create cloudtier user with the access keys given on the cloud client
|
||||
cloud_tier_user_id = "cloud-tier-user-" + cloud_client
|
||||
cloud_tier_user_name = "CLOUD TIER USER - " + cloud_client
|
||||
rgwadmin(self.ctx, cloud_client,
|
||||
cmd=['user', 'create', '--uid', 'cloud-tier-user',
|
||||
'--display-name', 'CLOUD TIER USER',
|
||||
cmd=['user', 'create', '--uid', cloud_tier_user_id,
|
||||
'--display-name', cloud_tier_user_name,
|
||||
'--access-key', cloud_access_key,
|
||||
'--secret', cloud_secret,
|
||||
'--caps', 'user-policy=*'],
|
||||
@ -115,7 +112,6 @@ class RGWCloudTier(Task):
|
||||
|
||||
cluster_name, daemon_type, client_id = teuthology.split_role(client)
|
||||
client_with_id = daemon_type + '.' + client_id
|
||||
client_with_cluster = cluster_name + '.' + client_with_id
|
||||
self.ctx.daemons.get_daemon('rgw', client_with_id, cluster_name).restart()
|
||||
log.info('restarted rgw daemon ...')
|
||||
|
||||
|
@ -44,13 +44,13 @@ def download(ctx, config):
|
||||
'git', 'clone',
|
||||
'-b', s3tests_branch,
|
||||
git_remote + 's3-tests.git',
|
||||
'{tdir}/s3-tests'.format(tdir=testdir),
|
||||
'{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||
],
|
||||
)
|
||||
if sha1 is not None:
|
||||
ctx.cluster.only(client).run(
|
||||
args=[
|
||||
'cd', '{tdir}/s3-tests'.format(tdir=testdir),
|
||||
'cd', '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||
run.Raw('&&'),
|
||||
'git', 'reset', '--hard', sha1,
|
||||
],
|
||||
@ -65,7 +65,7 @@ def download(ctx, config):
|
||||
args=[
|
||||
'rm',
|
||||
'-rf',
|
||||
'{tdir}/s3-tests'.format(tdir=testdir),
|
||||
'{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||
],
|
||||
)
|
||||
|
||||
@ -364,7 +364,6 @@ def configure(ctx, config):
|
||||
if lc_debug_interval:
|
||||
s3tests_conf['s3 main']['lc_debug_interval'] = lc_debug_interval
|
||||
|
||||
log.info('Before ctx.rgw_clouudtier %s ...', ctx.rgw_cloudtier)
|
||||
if ctx.rgw_cloudtier is not None:
|
||||
log.info(' ctx.rgw_cloudtier config is %s ...', ctx.rgw_cloudtier.config)
|
||||
client_rgw_config = ctx.rgw_cloudtier.config.get(client)
|
||||
@ -391,7 +390,7 @@ def configure(ctx, config):
|
||||
remote.run(
|
||||
args=[
|
||||
'cd',
|
||||
'{tdir}/s3-tests'.format(tdir=testdir),
|
||||
'{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||
run.Raw('&&'),
|
||||
'./bootstrap',
|
||||
],
|
||||
@ -411,7 +410,7 @@ def configure(ctx, config):
|
||||
conf = f.read().format(
|
||||
idle_timeout=config.get('idle_timeout', 30)
|
||||
)
|
||||
remote.write_file('{tdir}/boto.cfg'.format(tdir=testdir), conf)
|
||||
remote.write_file('{tdir}/boto-{client}.cfg'.format(tdir=testdir, client=client), conf)
|
||||
|
||||
try:
|
||||
yield
|
||||
@ -423,7 +422,7 @@ def configure(ctx, config):
|
||||
remote.run(
|
||||
args=[
|
||||
'rm',
|
||||
'{tdir}/boto.cfg'.format(tdir=testdir),
|
||||
'{tdir}/boto-{client}.cfg'.format(tdir=testdir, client=client),
|
||||
],
|
||||
)
|
||||
|
||||
@ -443,7 +442,7 @@ def run_tests(ctx, config):
|
||||
(remote,) = ctx.cluster.only(client).remotes.keys()
|
||||
args = [
|
||||
'S3TEST_CONF={tdir}/archive/s3-tests.{client}.conf'.format(tdir=testdir, client=client),
|
||||
'BOTO_CONFIG={tdir}/boto.cfg'.format(tdir=testdir)
|
||||
'BOTO_CONFIG={tdir}/boto-{client}.cfg'.format(tdir=testdir, client=client)
|
||||
]
|
||||
# the 'requests' library comes with its own ca bundle to verify ssl
|
||||
# certificates - override that to use the system's ca bundle, which
|
||||
@ -466,10 +465,10 @@ def run_tests(ctx, config):
|
||||
if 'extra_attrs' in client_config:
|
||||
attrs = client_config.get('extra_attrs')
|
||||
args += [
|
||||
'{tdir}/s3-tests/virtualenv/bin/python'.format(tdir=testdir),
|
||||
'{tdir}/s3-tests-{client}/virtualenv/bin/python'.format(tdir=testdir, client=client),
|
||||
'-m', 'nose',
|
||||
'-w',
|
||||
'{tdir}/s3-tests'.format(tdir=testdir),
|
||||
'{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||
'-v',
|
||||
'-a', ','.join(attrs),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user