Skip to content

rgw/notification: Store the value of persistent_queue for existing topics and continue commiting events for all topics subscribed to given bucket - #57536

Merged
cbodley merged 2 commits into
ceph:mainfrom
kchheda3:wip-fix-persistent-queue-regression
Jun 12, 2024

Conversation

@kchheda3

Copy link
Copy Markdown
Contributor

Fixes https://tracker.ceph.com/issues/66097

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@kchheda3
kchheda3 requested a review from a team as a code owner May 17, 2024 15:09
@kchheda3
kchheda3 requested a review from cbodley May 17, 2024 15:09
@github-actions github-actions Bot added the rgw label May 17, 2024
Comment thread src/rgw/rgw_rest_pubsub.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this should just copy dest.persistent_queue = topic->dest.persistent_queue. the topic we're overwriting may have been a legacy one whose queue doesn't include the tenant namespace

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it not be better in way, the user now gets migrated to correct queue name ?
just that old queue will remain there in the system

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not unless we have a way to clean up the old queue. the notification thread would keep polling on it forever

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be this code will still not make use of the new queue name even if it exist

if (struct_v >= 7) {
      decode(persistent_queue, bl);
    } else if (persistent) {
      // persistent topics created before v7 did not support tenant namespacing.
      // continue to use 'arn_topic' alone as the queue's rados object name
      persistent_queue = arn_topic;
    }
    

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this should just copy dest.persistent_queue = topic->dest.persistent_queue. the topic we're overwriting may have been a legacy one whose queue doesn't include the tenant namespace

done

@kchheda3
kchheda3 force-pushed the wip-fix-persistent-queue-regression branch from aa1efca to 05bb79e Compare May 17, 2024 15:31
@kchheda3
kchheda3 requested a review from cbodley May 17, 2024 15:31

@cbodley cbodley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks correct to me. is there a test case we can extend with a re-create to verify that persistent topics still work?

@kchheda3

kchheda3 commented May 17, 2024 •

Copy link
Copy Markdown
Contributor Author

looks correct to me. is there a test case we can extend with a re-create to verify that persistent topics still work?

looked at test_bn.py, do not see any active test case that re-creates the topic, there is test case test_ps_s3_topic_update that updates the endpoint of the topic and does all re-verification but its disabled and also its purpose is more of testing update on endpoints and verifying the events are still received and not about verifying the attributes.
also currently get-topic does not return persistent_queue so not sure if adding new test case would verify this issue, unless we verify it via radosgw-admin get topic

@yuvalif

yuvalif commented May 21, 2024

Copy link
Copy Markdown
Contributor

looks correct to me. is there a test case we can extend with a re-create to verify that persistent topics still work?

looked at test_bn.py, do not see any active test case that re-creates the topic, there is test case test_ps_s3_topic_update that updates the endpoint of the topic and does all re-verification but its disabled and also its purpose is more of testing update on endpoints and verifying the events are still received and not about verifying the attributes. also currently get-topic does not return persistent_queue so not sure if adding new test case would verify this issue, unless we verify it via radosgw-admin get topic

can we add that to one of the existing persistent notification tests?
just create the topic twice. and verify that we still see the notifications.

@kchheda3
kchheda3 force-pushed the wip-fix-persistent-queue-regression branch from 05bb79e to 9f4ea76 Compare May 21, 2024 18:47
@github-actions github-actions Bot added the tests label May 21, 2024
@kchheda3

Copy link
Copy Markdown
Contributor Author

looks correct to me. is there a test case we can extend with a re-create to verify that persistent topics still work?

looked at test_bn.py, do not see any active test case that re-creates the topic, there is test case test_ps_s3_topic_update that updates the endpoint of the topic and does all re-verification but its disabled and also its purpose is more of testing update on endpoints and verifying the events are still received and not about verifying the attributes. also currently get-topic does not return persistent_queue so not sure if adding new test case would verify this issue, unless we verify it via radosgw-admin get topic

can we add that to one of the existing persistent notification tests? just create the topic twice. and verify that we still see the notifications.

updated the existing test case to re-create the topic and verify the persistent_queue is correctly populated.

@kchheda3
kchheda3 requested review from cbodley and yuvalif May 21, 2024 18:47
@cbodley

cbodley commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants