]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #57536 from kchheda3/wip-fix-persistent-queue-regression
authorCasey Bodley <cbodley@users.noreply.github.com>
Wed, 12 Jun 2024 13:33:08 +0000 (14:33 +0100)
committerGitHub <noreply@github.com>
Wed, 12 Jun 2024 13:33:08 +0000 (14:33 +0100)
 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 <ylifshit@redhat.com>
1  2 
src/rgw/driver/rados/rgw_notify.cc
src/test/rgw/bucket_notification/test_bn.py

Simple merge
index 61b7374b7ef0f9d0e8d6937ddbfae6a1d120f498,9dc16d1c8f3e880ce1488f952b70578e4d91e448..23faaa5760f12149b5e04955099d6b0d77764fb2
@@@ -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)