]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
radosgw-admin: ignore 301 test against the same src and dest regions
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 10 Mar 2014 07:16:28 +0000 (00:16 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 10 Mar 2014 07:29:50 +0000 (00:29 -0700)
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
teuthology/task/radosgw-admin.py

index 65dc5c6e42a297342d6ef3cfc05e728535dd4be9..64b2f9ed960617a9a39a33ffec23d817cff7e99e 100644 (file)
@@ -249,10 +249,20 @@ def task(ctx, config):
             del out2['data']['bucket_info']['bucket']['index_pool']
             assert out1 == out2
 
+        same_region = 0
         for agent_client, c_config in ctx.radosgw_agent.config.iteritems():
             source_client = c_config['src']
             dest_client = c_config['dest']
 
+            source_region = rgw_utils.region_for_client(ctx, source_client)
+            dest_region = rgw_utils.region_for_client(ctx, dest_client)
+
+            # 301 is only returned for requests to something in a different region
+            if source_region == dest_region:
+                log.debug('301 is only returned for requests to something in a different region')
+                same_region += 1
+                continue
+
             # Attempt to create a new connection with user1 to the destination RGW
             log.debug('Attempt to create a new connection with user1 to the destination RGW')
             # and use that to attempt a delete (that should fail)
@@ -282,6 +292,10 @@ def task(ctx, config):
             bucket.delete()
             rgw_utils.radosgw_agent_sync_all(ctx)
 
+        if same_region == len(ctx.radosgw_agent.config):
+            bucket.delete()
+            rgw_utils.radosgw_agent_sync_all(ctx)
+
         # make sure that the bucket no longer exists in either region
         log.debug('make sure that the bucket no longer exists in either region')
         for agent_client, c_config in ctx.radosgw_agent.config.iteritems():
@@ -387,6 +401,9 @@ def task(ctx, config):
         log.debug('now we delete the bucket')
         bucket.delete()
 
+        log.debug('sync to propagate the deleted bucket')
+        rgw_utils.radosgw_agent_sync_all(ctx)
+
         # Delete user2 as later tests do not expect it to exist.
         # Verify that it is gone on both regions
         for agent_client, c_config in ctx.radosgw_agent.config.iteritems():