From: Casey Bodley Date: Wed, 12 Jun 2024 13:33:08 +0000 (+0100) Subject: Merge pull request #57536 from kchheda3/wip-fix-persistent-queue-regression X-Git-Tag: v20.0.0~1760 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f136742df1202d82bafe35763032a7ec7d6d2488;p=ceph.git Merge pull request #57536 from kchheda3/wip-fix-persistent-queue-regression rgw/notification: Store the value of `persistent_queue` for existing topics and continue commiting events for all topics subscribed to given bucket Reviewed-by: Yuval Lifshitz --- f136742df1202d82bafe35763032a7ec7d6d2488 diff --cc src/test/rgw/bucket_notification/test_bn.py index 61b7374b7ef0,9dc16d1c8f3e..23faaa5760f1 --- a/src/test/rgw/bucket_notification/test_bn.py +++ b/src/test/rgw/bucket_notification/test_bn.py @@@ -770,12 -674,31 +770,30 @@@ def test_ps_s3_topic_admin_on_master() assert_equal(parsed_result['arn'], topic_arn3) matches = [tenant, UID_PREFIX] assert_true( all([x in parsed_result['owner'] for x in matches])) + assert_equal(parsed_result['dest']['persistent_queue'], + tenant + ":" + topic_name + '_3') + + # recall CreateTopic and verify the owner and persistent_queue remain same. + topic_conf3 = PSTopicS3(conn, topic_name + '_3', zonegroup, + endpoint_args=endpoint_args) + topic_arn3 = topic_conf3.set_config() + assert_equal(topic_arn3, + 'arn:aws:sns:' + zonegroup + ':' + tenant + ':' + topic_name + '_3') + # get topic 3 via commandline + result = admin( + ['topic', 'get', '--topic', topic_name + '_3', '--tenant', tenant], + get_config_cluster()) + parsed_result = json.loads(result[0]) + assert_equal(parsed_result['arn'], topic_arn3) + assert_true(all([x in parsed_result['owner'] for x in matches])) + assert_equal(parsed_result['dest']['persistent_queue'], + tenant + ":" + topic_name + '_3') # delete topic 3 - _, result = admin(['topic', 'rm', '--topic', topic_name+'_3', '--tenant', tenant], get_config_cluster()) - assert_equal(result, 0) + remove_topic(topic_name + '_3', tenant) # try to get a deleted topic - _, result = admin(['topic', 'get', '--topic', topic_name+'_3', '--tenant', tenant], get_config_cluster()) + _, result = get_topic(topic_name + '_3', tenant, allow_failure=True) print('"topic not found" error is expected') assert_equal(result, 2)