Merge pull request #38871 from cbodley/wip-qa-rgw-valgrind-on

qa/rgw: reenable valgrind in rgw/verify suite

Reviewed-by: Ali Maredia <amaredia@redhat.com>
This commit is contained in:
Casey Bodley 2021-02-09 16:22:42 -05:00 committed by GitHub
commit 7f72ff359e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 21 deletions

View File

@ -1,14 +1,9 @@
# see http://tracker.ceph.com/issues/20360 and http://tracker.ceph.com/issues/18126
os_type: centos
tasks: tasks:
- install: - install:
# flavor: notcmalloc
- ceph: - ceph:
- openssl_keys: - openssl_keys:
- rgw: - rgw:
client.0: client.0:
# valgrind: [--tool=memcheck, --max-threads=1024] # http://tracker.ceph.com/issues/25214
overrides: overrides:
ceph: ceph:

View File

@ -5,8 +5,11 @@ os_version: "8.0"
overrides: overrides:
install: install:
ceph: ceph:
# flavor: notcmalloc flavor: notcmalloc
#debuginfo: true #debuginfo: true
rgw:
client.0:
valgrind: [--tool=memcheck, --max-threads=1024] # http://tracker.ceph.com/issues/25214
ceph: ceph:
conf: conf:
global: global:

View File

@ -5,6 +5,7 @@ import time
import subprocess import subprocess
import json import json
import boto3 import boto3
import botocore.exceptions
""" """
Rgw manual and dynamic resharding testing against a running instance Rgw manual and dynamic resharding testing against a running instance
@ -47,15 +48,6 @@ def exec_cmd(cmd):
return False return False
def get_radosgw_port():
out = exec_cmd('sudo netstat -nltp | grep radosgw')
log.debug('output: %s' % out)
x = out.decode('utf8').split(" ")
port = [i for i in x if ':' in i][0].split(':')[1]
log.info('radosgw port: %s' % port)
return port
class BucketStats: class BucketStats:
def __init__(self, bucket_name, bucket_id, num_objs=0, size_kb=0, num_shards=0): def __init__(self, bucket_name, bucket_id, num_objs=0, size_kb=0, num_shards=0):
self.bucket_name = bucket_name self.bucket_name = bucket_name
@ -118,14 +110,22 @@ def main():
verify=False, verify=False,
config=None, config=None,
) )
try:
list(conn.buckets.limit(1)) # just verify we can list buckets
except botocore.exceptions.ConnectionError as e:
print(e)
raise
print('connected to', endpoint)
return conn return conn
port = get_radosgw_port() try:
connection = boto_connect('80', False, 'http')
if port == '80': except botocore.exceptions.ConnectionError:
connection = boto_connect(port, ssl=False, proto='http') try: # retry on non-privileged http port
elif port == '443': connection = boto_connect('8000', False, 'http')
connection = boto_connect(port, ssl=True, proto='https') except botocore.exceptions.ConnectionError:
# retry with ssl
connection = boto_connect('443', True, 'https')
# create a bucket # create a bucket
bucket1 = connection.create_bucket(Bucket=BUCKET_NAME1) bucket1 = connection.create_bucket(Bucket=BUCKET_NAME1)