mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
Merge branch 'master' of https://github.com/ceph/ceph-qa-suite into wip-11570
Added time-outs to s3tests Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
This commit is contained in:
commit
a3e876708c
0
suites/teuthology/rgw/%
Normal file
0
suites/teuthology/rgw/%
Normal file
2
suites/teuthology/rgw/distros/rhel7.0.yaml
Normal file
2
suites/teuthology/rgw/distros/rhel7.0.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
os_type: rhel
|
||||
os_version: "7.0"
|
2
suites/teuthology/rgw/distros/ubuntu12.04.yaml
Normal file
2
suites/teuthology/rgw/distros/ubuntu12.04.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
os_type: ubuntu
|
||||
os_version: "12.04"
|
2
suites/teuthology/rgw/distros/ubuntu14.04.yaml
Normal file
2
suites/teuthology/rgw/distros/ubuntu14.04.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
os_type: ubuntu
|
||||
os_version: "14.04"
|
3
suites/teuthology/rgw/distros/vps_centos6.5.yaml
Normal file
3
suites/teuthology/rgw/distros/vps_centos6.5.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
machine_type: vps
|
||||
os_type: centos
|
||||
os_version: "6.5"
|
3
suites/teuthology/rgw/distros/vps_debian7.yaml
Normal file
3
suites/teuthology/rgw/distros/vps_debian7.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
machine_type: vps
|
||||
os_type: debian
|
||||
os_version: "7.0"
|
3
suites/teuthology/rgw/distros/vps_rhel6.5.yaml
Normal file
3
suites/teuthology/rgw/distros/vps_rhel6.5.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
machine_type: vps
|
||||
os_type: rhel
|
||||
os_version: "6.5"
|
23
suites/teuthology/rgw/tasks/s3tests-fastcgi.yaml
Normal file
23
suites/teuthology/rgw/tasks/s3tests-fastcgi.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
# this runs s3tests against rgw, using mod_fastcgi
|
||||
roles:
|
||||
- [mon.a, mon.c, osd.0, osd.1, osd.2, client.0]
|
||||
- [mon.b, osd.3, osd.4, osd.5, client.1]
|
||||
|
||||
tasks:
|
||||
- install:
|
||||
branch: master
|
||||
- ceph:
|
||||
- rgw: [client.0]
|
||||
- s3tests:
|
||||
client.0:
|
||||
rgw_server: client.0
|
||||
force-branch: master
|
||||
overrides:
|
||||
ceph:
|
||||
fs: ext4
|
||||
conf:
|
||||
client:
|
||||
debug rgw: 20
|
||||
rgw:
|
||||
ec-data-pool: false
|
||||
frontend: apache
|
26
suites/teuthology/rgw/tasks/s3tests-fcgi.yaml
Normal file
26
suites/teuthology/rgw/tasks/s3tests-fcgi.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
# this runs s3tests against rgw, using mod_proxy_fcgi
|
||||
# the choice between uds or tcp with mod_proxy_fcgi depends on the distro
|
||||
roles:
|
||||
- [mon.a, mon.c, osd.0, osd.1, osd.2, client.0]
|
||||
- [mon.b, osd.3, osd.4, osd.5, client.1]
|
||||
|
||||
tasks:
|
||||
- chef:
|
||||
- install:
|
||||
branch: master
|
||||
- ceph:
|
||||
- rgw: [client.0]
|
||||
- s3tests:
|
||||
client.0:
|
||||
rgw_server: client.0
|
||||
force-branch: master
|
||||
overrides:
|
||||
ceph:
|
||||
fs: ext4
|
||||
conf:
|
||||
client:
|
||||
debug rgw: 20
|
||||
rgw:
|
||||
ec-data-pool: false
|
||||
frontend: apache
|
||||
use_fcgi: true
|
@ -1,9 +1,12 @@
|
||||
workload:
|
||||
sequential:
|
||||
- rgw: [client.0]
|
||||
- rgw:
|
||||
client.0:
|
||||
default_idle_timeout: 300
|
||||
- print: "**** done rgw: [client.0] 2-workload"
|
||||
- s3tests:
|
||||
client.0:
|
||||
force-branch: firefly-original
|
||||
force-branch: giant
|
||||
rgw_server: client.0
|
||||
idle_timeout: 300
|
||||
- print: "**** done s3tests 2-workload"
|
||||
|
@ -4,5 +4,6 @@ tasks:
|
||||
- print: "**** done rgw: [client.1] 4-workload"
|
||||
- s3tests:
|
||||
client.1:
|
||||
force-branch: hammer
|
||||
rgw_server: client.1
|
||||
- print: "**** done s3tests 4-workload"
|
||||
|
@ -7,9 +7,6 @@
|
||||
<IfModule !rewrite_module>
|
||||
LoadModule rewrite_module {mod_path}/mod_rewrite.so
|
||||
</IfModule>
|
||||
<IfModule !fastcgi_module>
|
||||
LoadModule fastcgi_module {mod_path}/mod_fastcgi.so
|
||||
</IfModule>
|
||||
<IfModule !log_config_module>
|
||||
LoadModule log_config_module {mod_path}/mod_log_config.so
|
||||
</IfModule>
|
||||
@ -37,17 +34,7 @@ LogFormat "%h l %u %t \"%r\" %>s %b \"{{Referer}}i\" \"%{{User-agent}}i\"" combi
|
||||
CustomLog {testdir}/archive/apache.{client}/access.log combined
|
||||
PidFile {testdir}/apache/tmp.{client}/apache.pid
|
||||
DocumentRoot {testdir}/apache/htdocs.{client}
|
||||
FastCgiIPCDir {testdir}/apache/tmp.{client}/fastcgi_sock
|
||||
FastCgiExternalServer {testdir}/apache/htdocs.{client}/rgw.fcgi -socket rgw_sock -idle-timeout {idle_timeout}
|
||||
RewriteEngine On
|
||||
|
||||
RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*) /rgw.fcgi?page=$1¶ms=$2&%{{QUERY_STRING}} [E=HTTP_AUTHORIZATION:%{{HTTP:Authorization}},L]
|
||||
|
||||
# Set fastcgi environment variables.
|
||||
# Note that this is separate from Unix environment variables!
|
||||
SetEnv RGW_LOG_LEVEL 20
|
||||
SetEnv RGW_SHOULD_LOG yes
|
||||
SetEnv RGW_PRINT_CONTINUE {print_continue}
|
||||
|
||||
<Directory {testdir}/apache/htdocs.{client}>
|
||||
Options +ExecCGI
|
||||
@ -58,3 +45,4 @@ SetEnv RGW_PRINT_CONTINUE {print_continue}
|
||||
AllowEncodedSlashes On
|
||||
ServerSignature Off
|
||||
MaxRequestsPerChild 0
|
||||
|
||||
|
@ -261,7 +261,7 @@ def calamari_install(config, cal_svr):
|
||||
finally:
|
||||
log.info('Cleaning up after Calamari installation')
|
||||
if icetype == 'iso':
|
||||
cal_svr.run(['sudo', 'umount', mountpoint])
|
||||
cal_svr.run(args=['sudo', 'umount', mountpoint])
|
||||
if delete_iceball:
|
||||
os.unlink(iceball_file)
|
||||
|
||||
|
@ -37,11 +37,12 @@ class TestMDSAutoRepair(CephFSTestCase):
|
||||
# create more files in another directory. make sure MDS trim dentries in testdir1
|
||||
self.mount_a.run_shell(["sudo", "bash", "-c", create_script.format("testdir2")])
|
||||
|
||||
# drop inodes caps
|
||||
self.mount_a.umount_wait()
|
||||
|
||||
# flush journal entries to dirfrag objects
|
||||
self.fs.mds_asok(['flush', 'journal'])
|
||||
|
||||
# drop inodes caps
|
||||
self.mount_a.umount_wait()
|
||||
self.mount_a.mount()
|
||||
self.mount_a.wait_until_mounted()
|
||||
|
||||
|
17
tasks/mod_fastcgi.conf.template
Normal file
17
tasks/mod_fastcgi.conf.template
Normal file
@ -0,0 +1,17 @@
|
||||
# mod_fastcgi config goes here
|
||||
|
||||
# Set fastcgi environment variables.
|
||||
# Note that this is separate from Unix environment variables!
|
||||
SetEnv RGW_LOG_LEVEL 20
|
||||
SetEnv RGW_SHOULD_LOG yes
|
||||
SetEnv RGW_PRINT_CONTINUE {print_continue}
|
||||
|
||||
<IfModule !fastcgi_module>
|
||||
LoadModule fastcgi_module {mod_path}/mod_fastcgi.so
|
||||
</IfModule>
|
||||
|
||||
FastCgiIPCDir {testdir}/apache/tmp.{client}/fastcgi_sock
|
||||
FastCgiExternalServer {testdir}/apache/htdocs.{client}/rgw.fcgi -socket rgw_sock -idle-timeout {idle_timeout}
|
||||
RewriteEngine On
|
||||
|
||||
RewriteRule ^/([a-zA-Z0-9-_.]*)([/]?.*) /rgw.fcgi?page=$1¶ms=$2&%{{QUERY_STRING}} [E=HTTP_AUTHORIZATION:%{{HTTP:Authorization}},L]
|
16
tasks/mod_proxy_fcgi.tcp.conf.template
Normal file
16
tasks/mod_proxy_fcgi.tcp.conf.template
Normal file
@ -0,0 +1,16 @@
|
||||
# mod_proxy_fcgi config, using TCP
|
||||
|
||||
<IfModule !proxy_module>
|
||||
LoadModule proxy_module {mod_path}/mod_proxy.so
|
||||
</IfModule>
|
||||
<IfModule !proxy_fcgi_module>
|
||||
LoadModule proxy_fcgi_module {mod_path}/mod_proxy_fcgi.so
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{{HTTP:Authorization}},L]
|
||||
|
||||
SetEnv proxy-nokeepalive 1
|
||||
|
||||
ProxyPass / fcgi://0.0.0.0:9000/
|
14
tasks/mod_proxy_fcgi.uds.conf.template
Normal file
14
tasks/mod_proxy_fcgi.uds.conf.template
Normal file
@ -0,0 +1,14 @@
|
||||
# mod_proxy_fcgi config, using UDS
|
||||
|
||||
<IfModule !proxy_module>
|
||||
LoadModule proxy_module {mod_path}/mod_proxy.so
|
||||
</IfModule>
|
||||
<IfModule !proxy_fcgi_module>
|
||||
LoadModule proxy_fcgi_module {mod_path}/mod_proxy_fcgi.so
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{{HTTP:Authorization}},L]
|
||||
|
||||
ProxyPass / unix://{testdir}/apache/tmp.{client}/fastcgi_sock/rgw_sock|fcgi://localhost:9000/ disablereuse=On
|
93
tasks/rgw.py
93
tasks/rgw.py
@ -72,6 +72,19 @@ def create_apache_dirs(ctx, config):
|
||||
)
|
||||
|
||||
|
||||
def _use_uds_with_fcgi(remote):
|
||||
"""
|
||||
Returns true if this node supports the usage of
|
||||
unix domain sockets with mod_proxy_fcgi.
|
||||
|
||||
FIXME: returns False always for now until we know for
|
||||
sure what distros will support UDS. RHEL 7.0 is the only one
|
||||
currently I know of, but we can't install that version of apache
|
||||
yet in the labs.
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def ship_apache_configs(ctx, config, role_endpoints):
|
||||
"""
|
||||
@ -105,8 +118,27 @@ def ship_apache_configs(ctx, config, role_endpoints):
|
||||
apache24_modconfig = \
|
||||
'IncludeOptional /etc/httpd/conf.modules.d/00-mpm.conf'
|
||||
host, port = role_endpoints[client]
|
||||
|
||||
# decide if we want to use mod_fastcgi or mod_proxy_fcgi
|
||||
template_dir = os.path.dirname(__file__)
|
||||
fcgi_config = os.path.join(template_dir,
|
||||
'mod_proxy_fcgi.tcp.conf.template')
|
||||
if ctx.rgw.use_fastcgi:
|
||||
log.info("Apache is configured to use mod_fastcgi")
|
||||
fcgi_config = os.path.join(template_dir,
|
||||
'mod_fastcgi.conf.template')
|
||||
elif _use_uds_with_fcgi(remote):
|
||||
log.info("Apache is configured to use mod_proxy_fcgi with UDS")
|
||||
fcgi_config = os.path.join(template_dir,
|
||||
'mod_proxy_fcgi.uds.conf.template')
|
||||
else:
|
||||
log.info("Apache is configured to use mod_proxy_fcgi with TCP")
|
||||
|
||||
with file(fcgi_config, 'rb') as f:
|
||||
fcgi_config = f.read()
|
||||
with file(src, 'rb') as f:
|
||||
conf = f.read().format(
|
||||
conf = f.read() + fcgi_config
|
||||
conf = conf.format(
|
||||
testdir=testdir,
|
||||
mod_path=mod_path,
|
||||
print_continue=print_continue,
|
||||
@ -125,6 +157,23 @@ def ship_apache_configs(ctx, config, role_endpoints):
|
||||
client=client),
|
||||
data=conf,
|
||||
)
|
||||
rgw_options = []
|
||||
if ctx.rgw.use_fastcgi or _use_uds_with_fcgi(remote):
|
||||
rgw_options = [
|
||||
'--rgw-socket-path',
|
||||
'{tdir}/apache/tmp.{client}/fastcgi_sock/rgw_sock'.format(
|
||||
tdir=testdir,
|
||||
client=client
|
||||
),
|
||||
]
|
||||
else:
|
||||
rgw_options = [
|
||||
'--rgw-socket-path', '""',
|
||||
'--rgw-print-continue', 'false',
|
||||
'--rgw-frontends',
|
||||
'fastcgi socket_port=9000 socket_host=0.0.0.0',
|
||||
]
|
||||
|
||||
teuthology.write_file(
|
||||
remote=remote,
|
||||
path='{tdir}/apache/htdocs.{client}/rgw.fcgi'.format(
|
||||
@ -132,9 +181,9 @@ def ship_apache_configs(ctx, config, role_endpoints):
|
||||
client=client),
|
||||
data="""#!/bin/sh
|
||||
ulimit -c unlimited
|
||||
exec radosgw -f -n {client} -k /etc/ceph/ceph.{client}.keyring --rgw-socket-path {tdir}/apache/tmp.{client}/fastcgi_sock/rgw_sock
|
||||
exec radosgw -f -n {client} -k /etc/ceph/ceph.{client}.keyring {rgw_options}
|
||||
|
||||
""".format(tdir=testdir, client=client)
|
||||
""".format(tdir=testdir, client=client, rgw_options=" ".join(rgw_options))
|
||||
)
|
||||
remote.run(
|
||||
args=[
|
||||
@ -193,13 +242,25 @@ def start_rgw(ctx, config):
|
||||
rgw_cmd = ['radosgw']
|
||||
|
||||
if ctx.rgw.frontend == 'apache':
|
||||
rgw_cmd.extend([
|
||||
'--rgw-socket-path',
|
||||
'{tdir}/apache/tmp.{client}/fastcgi_sock/rgw_sock'.format(
|
||||
tdir=testdir,
|
||||
client=client,
|
||||
),
|
||||
])
|
||||
if ctx.rgw.use_fastcgi or _use_uds_with_fcgi(remote):
|
||||
rgw_cmd.extend([
|
||||
'--rgw-socket-path',
|
||||
'{tdir}/apache/tmp.{client}/fastcgi_sock/rgw_sock'.format(
|
||||
tdir=testdir,
|
||||
client=client,
|
||||
),
|
||||
'--rgw-frontends',
|
||||
'fastcgi socket_port=9000 socket_host=0.0.0.0',
|
||||
])
|
||||
else:
|
||||
# for mod_proxy_fcgi, using tcp
|
||||
rgw_cmd.extend([
|
||||
'--rgw-socket-path', '',
|
||||
'--rgw-print-continue', 'false',
|
||||
'--rgw-frontends',
|
||||
'fastcgi socket_port=9000 socket_host=0.0.0.0',
|
||||
])
|
||||
|
||||
elif ctx.rgw.frontend == 'civetweb':
|
||||
host, port = ctx.rgw.role_endpoints[client]
|
||||
rgw_cmd.extend([
|
||||
@ -702,6 +763,12 @@ def task(ctx, config):
|
||||
rgw print continue: false
|
||||
- rgw: [client.0]
|
||||
|
||||
To use mod_proxy_fcgi instead of mod_fastcgi:
|
||||
|
||||
overrides:
|
||||
rgw:
|
||||
use_fcgi: true
|
||||
|
||||
To run rgws for multiple regions or zones, describe the regions
|
||||
and their zones in a regions section. The endpoints will be
|
||||
generated by this task. Each client must have a region, zone,
|
||||
@ -811,6 +878,12 @@ def task(ctx, config):
|
||||
ctx.rgw.frontend = config['frontend']
|
||||
del config['frontend']
|
||||
|
||||
ctx.rgw.use_fastcgi = True
|
||||
if "use_fcgi" in config:
|
||||
ctx.rgw.use_fastcgi = False
|
||||
log.info("Using mod_proxy_fcgi instead of mod_fastcgi...")
|
||||
del config['use_fcgi']
|
||||
|
||||
subtasks = [
|
||||
lambda: configure_regions_and_zones(
|
||||
ctx=ctx,
|
||||
|
@ -326,6 +326,9 @@ def run_tests(ctx, config):
|
||||
"""
|
||||
assert isinstance(config, dict)
|
||||
testdir = teuthology.get_testdir(ctx)
|
||||
attrs = ["!fails_on_rgw"]
|
||||
if not ctx.rgw.use_fastcgi:
|
||||
attrs.append("!fails_on_mod_proxy_fcgi")
|
||||
for client, client_config in config.iteritems():
|
||||
args = [
|
||||
'S3TEST_CONF={tdir}/archive/s3-tests.{client}.conf'.format(tdir=testdir, client=client),
|
||||
@ -334,7 +337,7 @@ def run_tests(ctx, config):
|
||||
'-w',
|
||||
'{tdir}/s3-tests'.format(tdir=testdir),
|
||||
'-v',
|
||||
'-a', '!fails_on_rgw',
|
||||
'-a', ','.join(attrs),
|
||||
]
|
||||
if client_config is not None and 'extra_args' in client_config:
|
||||
args.extend(client_config['extra_args'])
|
||||
|
Loading…
Reference in New Issue
Block a user