mirror of
https://github.com/ceph/ceph
synced 2025-04-26 04:39:32 +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:
|
roles:
|
||||||
- [mon.a, osd.0, osd.1, osd.2, mgr.0, client.0, client.1]
|
- [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
|
port: 8000
|
||||||
client.1:
|
client.1:
|
||||||
port: 8001
|
port: 8001
|
||||||
|
#client.2:
|
||||||
|
#port: 8002
|
||||||
|
#client.3:
|
||||||
|
#port: 8003
|
||||||
- rgw-cloudtier:
|
- rgw-cloudtier:
|
||||||
client.0:
|
client.0:
|
||||||
# cloudtier storage class params
|
# cloudtier storage class params
|
||||||
cloud_storage_class: CLOUDTIER
|
# retain_head_object = false
|
||||||
|
cloud_storage_class: CLOUDTIER-CLIENT0
|
||||||
cloud_client: client.1
|
cloud_client: client.1
|
||||||
cloud_regular_storage_class: LUKEWARM
|
cloud_regular_storage_class: LUKEWARM
|
||||||
cloud_target_storage_class: FROZEN
|
cloud_target_storage_class: FROZEN
|
||||||
cloud_retain_head_object: "true"
|
cloud_retain_head_object: "false"
|
||||||
cloud_target_path: "teuthology"
|
cloud_target_path: "teuthology-client0"
|
||||||
cloudtier_user:
|
cloudtier_user:
|
||||||
# cloud-user creds to be created on cloud-client
|
# cloud-user creds to be created on cloud-client
|
||||||
cloud_secret: "abcefgh"
|
cloud_secret: "abcefgh"
|
||||||
cloud_access_key: "12345678"
|
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:
|
- s3tests:
|
||||||
client.0:
|
client.0:
|
||||||
force-repo: https://github.com/soumyakoduri/s3-tests.git
|
force-branch: ceph-master
|
||||||
git_remote: https://github.com/soumyakoduri/
|
|
||||||
force-branch: cloudtier_tests
|
|
||||||
rgw_server: client.0
|
rgw_server: client.0
|
||||||
storage classes: LUKEWARM, FROZEN
|
storage classes: LUKEWARM, FROZEN
|
||||||
extra_attrs: ["cloud_transition"]
|
extra_attrs: ["cloud_transition"]
|
||||||
lc_debug_interval: 10
|
lc_debug_interval: 10
|
||||||
cloudtier_tests: True
|
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
|
||||||
|
@ -2,14 +2,10 @@
|
|||||||
rgw_cloudtier configuration routines
|
rgw_cloudtier configuration routines
|
||||||
"""
|
"""
|
||||||
import argparse
|
import argparse
|
||||||
import contextlib
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from teuthology.orchestra import run
|
|
||||||
from teuthology import misc as teuthology
|
from teuthology import misc as teuthology
|
||||||
from teuthology import contextutil
|
|
||||||
from teuthology.exceptions import ConfigError
|
from teuthology.exceptions import ConfigError
|
||||||
from tasks.util import get_remote_for_role
|
|
||||||
from tasks.util.rgw import rgwadmin, wait_for_radosgw
|
from tasks.util.rgw import rgwadmin, wait_for_radosgw
|
||||||
from teuthology.task import Task
|
from teuthology.task import Task
|
||||||
|
|
||||||
@ -67,7 +63,6 @@ class RGWCloudTier(Task):
|
|||||||
cloud_storage_class = client_config.get('cloud_storage_class')
|
cloud_storage_class = client_config.get('cloud_storage_class')
|
||||||
cloud_target_path = client_config.get('cloud_target_path')
|
cloud_target_path = client_config.get('cloud_target_path')
|
||||||
cloud_target_storage_class = client_config.get('cloud_target_storage_class')
|
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')
|
cloud_retain_head_object = client_config.get('cloud_retain_head_object')
|
||||||
|
|
||||||
cloudtier_user = client_config.get('cloudtier_user')
|
cloudtier_user = client_config.get('cloudtier_user')
|
||||||
@ -103,9 +98,11 @@ class RGWCloudTier(Task):
|
|||||||
check_status=True)
|
check_status=True)
|
||||||
|
|
||||||
## create cloudtier user with the access keys given on the cloud client
|
## 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,
|
rgwadmin(self.ctx, cloud_client,
|
||||||
cmd=['user', 'create', '--uid', 'cloud-tier-user',
|
cmd=['user', 'create', '--uid', cloud_tier_user_id,
|
||||||
'--display-name', 'CLOUD TIER USER',
|
'--display-name', cloud_tier_user_name,
|
||||||
'--access-key', cloud_access_key,
|
'--access-key', cloud_access_key,
|
||||||
'--secret', cloud_secret,
|
'--secret', cloud_secret,
|
||||||
'--caps', 'user-policy=*'],
|
'--caps', 'user-policy=*'],
|
||||||
@ -115,7 +112,6 @@ class RGWCloudTier(Task):
|
|||||||
|
|
||||||
cluster_name, daemon_type, client_id = teuthology.split_role(client)
|
cluster_name, daemon_type, client_id = teuthology.split_role(client)
|
||||||
client_with_id = daemon_type + '.' + client_id
|
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()
|
self.ctx.daemons.get_daemon('rgw', client_with_id, cluster_name).restart()
|
||||||
log.info('restarted rgw daemon ...')
|
log.info('restarted rgw daemon ...')
|
||||||
|
|
||||||
|
@ -44,13 +44,13 @@ def download(ctx, config):
|
|||||||
'git', 'clone',
|
'git', 'clone',
|
||||||
'-b', s3tests_branch,
|
'-b', s3tests_branch,
|
||||||
git_remote + 's3-tests.git',
|
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:
|
if sha1 is not None:
|
||||||
ctx.cluster.only(client).run(
|
ctx.cluster.only(client).run(
|
||||||
args=[
|
args=[
|
||||||
'cd', '{tdir}/s3-tests'.format(tdir=testdir),
|
'cd', '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||||
run.Raw('&&'),
|
run.Raw('&&'),
|
||||||
'git', 'reset', '--hard', sha1,
|
'git', 'reset', '--hard', sha1,
|
||||||
],
|
],
|
||||||
@ -65,7 +65,7 @@ def download(ctx, config):
|
|||||||
args=[
|
args=[
|
||||||
'rm',
|
'rm',
|
||||||
'-rf',
|
'-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:
|
if lc_debug_interval:
|
||||||
s3tests_conf['s3 main']['lc_debug_interval'] = 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:
|
if ctx.rgw_cloudtier is not None:
|
||||||
log.info(' ctx.rgw_cloudtier config is %s ...', ctx.rgw_cloudtier.config)
|
log.info(' ctx.rgw_cloudtier config is %s ...', ctx.rgw_cloudtier.config)
|
||||||
client_rgw_config = ctx.rgw_cloudtier.config.get(client)
|
client_rgw_config = ctx.rgw_cloudtier.config.get(client)
|
||||||
@ -391,7 +390,7 @@ def configure(ctx, config):
|
|||||||
remote.run(
|
remote.run(
|
||||||
args=[
|
args=[
|
||||||
'cd',
|
'cd',
|
||||||
'{tdir}/s3-tests'.format(tdir=testdir),
|
'{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||||
run.Raw('&&'),
|
run.Raw('&&'),
|
||||||
'./bootstrap',
|
'./bootstrap',
|
||||||
],
|
],
|
||||||
@ -411,7 +410,7 @@ def configure(ctx, config):
|
|||||||
conf = f.read().format(
|
conf = f.read().format(
|
||||||
idle_timeout=config.get('idle_timeout', 30)
|
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:
|
try:
|
||||||
yield
|
yield
|
||||||
@ -423,7 +422,7 @@ def configure(ctx, config):
|
|||||||
remote.run(
|
remote.run(
|
||||||
args=[
|
args=[
|
||||||
'rm',
|
'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()
|
(remote,) = ctx.cluster.only(client).remotes.keys()
|
||||||
args = [
|
args = [
|
||||||
'S3TEST_CONF={tdir}/archive/s3-tests.{client}.conf'.format(tdir=testdir, client=client),
|
'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
|
# the 'requests' library comes with its own ca bundle to verify ssl
|
||||||
# certificates - override that to use the system's ca bundle, which
|
# 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:
|
if 'extra_attrs' in client_config:
|
||||||
attrs = client_config.get('extra_attrs')
|
attrs = client_config.get('extra_attrs')
|
||||||
args += [
|
args += [
|
||||||
'{tdir}/s3-tests/virtualenv/bin/python'.format(tdir=testdir),
|
'{tdir}/s3-tests-{client}/virtualenv/bin/python'.format(tdir=testdir, client=client),
|
||||||
'-m', 'nose',
|
'-m', 'nose',
|
||||||
'-w',
|
'-w',
|
||||||
'{tdir}/s3-tests'.format(tdir=testdir),
|
'{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client),
|
||||||
'-v',
|
'-v',
|
||||||
'-a', ','.join(attrs),
|
'-a', ','.join(attrs),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user