Conversation
|
@oshrey16 - thanks for fixing this! |
|
@jmundack Thank you for the feedback! |
| driver->stat_topics_v1(s->bucket->get_tenant(), null_yield, this) == -ENOENT) { | ||
| op_ret = ps.get_topics_v1(this, result, y); | ||
| } else { | ||
| driver->stat_topics_v1(s->bucket_tenant, null_yield, this) == -ENOENT) { |
There was a problem hiding this comment.
- why did you switch the if/else conditions?
- this will fix the issue, but won't work in case of tenented topics (the "bucket_tenant" is probably empty in SNS requests). i think that the right things would be to use the
get_account_or_tenant()call from line 495 to get the right value
There was a problem hiding this comment.
Thank you for the review!
I switched the conditions to fix the issue with V2 support. When both conditions are true:
- Zonegroups support
V2notifications. - The
V1topic file is missing.
In this case, we’re fully in V2, so the system uses the get_topics_v2 function to retrieve topics from the V2 configuration.
If only one condition is met, it can indicate one of the following states:
- Migration: The
V1topic file is exists, but all zonegroups supportV2, indicating we’re migrating toV2. Here, the system should prioritizeget_topics_v1. - V1: The
V1topic file exists, and not all zonegroups supportV2. In this case, we fall back toget_topics_v1to retrieve topics from theV1configuration.
The updated code now correctly prioritizes get_topics_v2 when conditions allow and falls back to get_topics_v1 only when necessary.
I understand your concern regarding tenanted topics and will update the code to use get_account_or_tenant() to fetch the correct tenant information for SNS requests.
| http_server.close() | ||
|
|
||
|
|
||
| @attr('kafka_test') |
There was a problem hiding this comment.
to verify getting the topic list, you do not need to actually send them.
so, better to mark that as a basic_test.
| topic_name2 = bucket_name + TOPIC_SUFFIX + '2' | ||
| topic_name3 = bucket_name + TOPIC_SUFFIX + '3' | ||
| # Start kafka receiver | ||
| task, receiver = create_kafka_receiver_thread(topic_name1) |
There was a problem hiding this comment.
see my previos comment. no need to start the kafka reciever - we are not sending any notifications, just configuring topics
There was a problem hiding this comment.
note that you can still create a topic with a kafka endpoint, we don't check whether the endpoint is there until we send actual topics to it
|
|
||
| # Create s3 topics | ||
| zonegroup = get_config_zonegroup() | ||
| topic_conf = PSTopicS3(conn, topic_name1, zonegroup, endpoint_args=endpoint_args) |
There was a problem hiding this comment.
please also add a case where we create a topic on a specific tenant, to make sure that we get the list per-tenant.
d46b919 to
96f04e0
Compare
|
jenkins test make check |
3 similar comments
|
jenkins test make check |
|
jenkins test make check |
|
jenkins test make check |
96f04e0 to
0ae8d76
Compare
- Fixed a segmentation fault caused by a null bucket pointer in RGWPSListTopicsOp::execute() - Corrected logic to use get_topics_v2 when supported, with fallback otherwise Fixes: https://tracker.ceph.com/issues/68756 Signed-off-by: Oshrey Avraham <oshrey16@gmail.com>
0ae8d76 to
d27dab2
Compare
|
jenkins test make check |
|
jenkins test api |
|
teuthology
|
This PR resolves two issues in
RGWPSListTopicsOp::execute():Segmentation Fault: Resolved a segmentation fault caused by dereferencing a null bucket pointer. Updated the code to use
get_account_or_tenant(s->owner.id)to handle the bucket owner safely and prevent crashes.Fix for Topic Listing Logic: Fixed an issue where v2 notifications were not retrieved when v2 support was enabled. The logic now uses
get_topics_v2when available, and falls back toget_topics_v1in cases v1 system or migration.Fixes: https://tracker.ceph.com/issues/68756
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e