From 677dbfce6132fef9a968edc9020beb5a8f615614 Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Sun, 14 Apr 2019 18:48:24 +0300 Subject: [PATCH] Merge branch 'wip-yuval-pubsub_teuthology' of https://github.com/ceph/ceph-ci into wip-yuval-pubsub_teuthology Signed-off-by: Yuval Lifshitz --- qa/suites/rgw/multisite/realms/three-zone.yaml | 1 + qa/tasks/rgw_multisite.py | 10 +++++++++- src/test/rgw/rgw_multi/tests_ps.py | 1 - src/test/rgw/rgw_multi/zone_ps.py | 7 +++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/qa/suites/rgw/multisite/realms/three-zone.yaml b/qa/suites/rgw/multisite/realms/three-zone.yaml index a8a7ca1d138..018ed55ff3c 100644 --- a/qa/suites/rgw/multisite/realms/three-zone.yaml +++ b/qa/suites/rgw/multisite/realms/three-zone.yaml @@ -18,3 +18,4 @@ overrides: endpoints: [c2.client.0] - name: test-zone3 endpoints: [c1.client.1] + is_pubsub: true diff --git a/qa/tasks/rgw_multisite.py b/qa/tasks/rgw_multisite.py index c39cb935fb3..b97cb8e6e91 100644 --- a/qa/tasks/rgw_multisite.py +++ b/qa/tasks/rgw_multisite.py @@ -11,6 +11,7 @@ from util.rgw import rgwadmin, wait_for_radosgw from util.rados import create_ec_pool, create_replicated_pool from rgw_multi import multisite from rgw_multi.zone_rados import RadosZone as RadosZone +from rgw_multi.zone_ps import PSZone as PSZone from teuthology.orchestra import run from teuthology import misc @@ -33,6 +34,7 @@ class RGWMultisite(Task): * 'is_master' is passed on the command line as --master * 'is_default' is passed on the command line as --default + * 'is_pubsub' is used to create a zone with tier-type=pubsub * 'endpoints' given as client names are replaced with actual endpoints zonegroups: @@ -78,6 +80,9 @@ class RGWMultisite(Task): - name: test-zone2 is_default: true endpoints: [c2.client.0] + - name: test-zone3 + is_pubsub: true + endpoints: [c1.client.1] """ def __init__(self, ctx, config): @@ -369,7 +374,10 @@ def create_zonegroup(cluster, gateways, period, config): def create_zone(ctx, cluster, gateways, creds, zonegroup, config): """ create a zone with the given configuration """ zone = multisite.Zone(config['name'], zonegroup, cluster) - zone = RadosZone(config['name'], zonegroup, cluster) + if config.pop('is_master', False): + zone = PSZone(config['name'], zonegroup, cluster) + else: + zone = RadosZone(config['name'], zonegroup, cluster) # collect Gateways for the zone's endpoints endpoints = config.get('endpoints') diff --git a/src/test/rgw/rgw_multi/tests_ps.py b/src/test/rgw/rgw_multi/tests_ps.py index 8846f5a8008..2304395a3f8 100644 --- a/src/test/rgw/rgw_multi/tests_ps.py +++ b/src/test/rgw/rgw_multi/tests_ps.py @@ -129,7 +129,6 @@ NOTIFICATION_SUFFIX = "_notif" # pubsub tests ############## - def test_ps_info(): """ log information for manual testing """ return SkipTest("only used in manual testing") diff --git a/src/test/rgw/rgw_multi/zone_ps.py b/src/test/rgw/rgw_multi/zone_ps.py index ca97d4c57b6..006f4fc7bae 100644 --- a/src/test/rgw/rgw_multi/zone_ps.py +++ b/src/test/rgw/rgw_multi/zone_ps.py @@ -74,6 +74,13 @@ def make_request(conn, method, resource, parameters=None, sign_parameters=False, return data, status +def print_connection_info(conn): + """print info of connection""" + print("Host: " + conn.host+':'+str(conn.port)) + print("AWS Secret Key: " + conn.aws_secret_access_key) + print("AWS Access Key: " + conn.aws_access_key_id) + + class PSTopic: """class to set/get/delete a topic PUT /topics/[?push-endpoint=&[=...]]