Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kchheda3
Copy link
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
// initialize the persistent queue's location, using ':' as the namespace
// delimiter because its inclusion in a TopicName would break ARNs
dest.persistent_queue =
string_cat_reserve(get_account_or_tenant(s->owner.id), ":", topic_name);
Copy link
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
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
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
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
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
Copy link
Contributor

@cbodley cbodley left a comment

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
Copy link
Contributor Author

kchheda3 commented May 17, 2024

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
Copy link
Contributor

yuvalif commented May 21, 2024

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.

…persistent topic.

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

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
…opics subscribed to bucket even if there is failure to load any single topic .

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

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
@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
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 yuvalif and cbodley May 21, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants