Repository navigation
rgw/multisite: remove old zonegroup name on the remote zone after a rename - #68033
Merged
Merged
Conversation
added 4 commits
March 26, 2026 03:46
…one after a rename Signed-off-by: Shilpa Jagannath <[email protected]>
…te_period() function. calling it twice for the same epoch in RGWOp_Period_Post, resulted in a -EEXIST response to the second call. as a result reflect_period() which updates the local objects and period history update was being skipped. Signed-off-by: Shilpa Jagannath <[email protected]>
update_latest_epoch() calls correctly Signed-off-by: Shilpa Jagannath <[email protected]>
Signed-off-by: Shilpa Jagannath <[email protected]>
3 of 14 tasks
Contributor
Author
cbodley
approved these changes
Mar 26, 2026
Merged
4 of 14 tasks
Contributor
|
Pr testing completed and approved by @ivancich, More details in : https://tracker.ceph.com/issues/76032. |
4 of 14 tasks
4 of 14 tasks
thuvh
added a commit
to thuvh/ceph
that referenced
this pull request
Nov 23, 2026
Tracker ceph#69566 asks for a test covering the scenario where a Kafka broker rejects topic creation -- e.g. the topic already exists with conflicting ACLs. That is the same path that caused the crash in ceph#68033, where rd_kafka_topic_name() was called on a NULL rd_kafka_topic_t*. The crash itself was fixed in PR ceph#59741, but the post-fix branch in rgw_kafka.cc (publish_internal invoking the callback with a negative errno when rd_kafka_topic_new() returns NULL) was never exercised by an automated test: there was not even a C++ unit test for rgw_kafka, unlike the analogous amqp endpoint. Add a controllable kafka_mock (replacing the no-op kafka_stub) and a unittest_rgw_kafka modeled on unittest_rgw_amqp. The mock lets tests force rd_kafka_topic_new() / rd_kafka_produce() to fail and toggle ack/nack on poll. The TopicCreationFailure test forces RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS and asserts the publish callback fires with a negative errno and no crash, so any future regression that revisits the NULL topic handle will surface in CI. Fixes: https://tracker.ceph.com/issues/69566 Related: https://tracker.ceph.com/issues/68033 Signed-off-by: Hoai-Thu Vuong <[email protected]>
thuvh
added a commit
to thuvh/ceph
that referenced
this pull request
Nov 30, 2026
Tracker ceph#69566 asks for a test covering the scenario where a Kafka broker rejects topic creation -- e.g. the topic already exists with conflicting ACLs. That is the same path that caused the crash in ceph#68033, where rd_kafka_topic_name() was called on a NULL rd_kafka_topic_t*. The crash itself was fixed in PR ceph#59741, but the post-fix branch in rgw_kafka.cc (publish_internal invoking the callback with a negative errno when rd_kafka_topic_new() returns NULL) was never exercised by an automated test: there was not even a C++ unit test for rgw_kafka, unlike the analogous amqp endpoint. Add a controllable kafka_mock and a unittest_rgw_kafka modeled on unittest_rgw_amqp. The mock lets tests force rd_kafka_topic_new() / rd_kafka_produce() to fail and toggle ack/nack on poll. The TopicCreationFailure test forces RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS and asserts the publish callback fires with a negative errno and no crash, so any future regression that revisits the NULL topic handle will surface in CI. The existing kafka_stub is kept unchanged as the link-fallback for other RGW test binaries. The mock and the stub define the same rd_kafka_* symbols and so cannot coexist in one binary: unittest_rgw_kafka drops kafka_stub from its lib list (list(REMOVE_ITEM)) and links kafka_mock instead. No other test binary's link behavior changes. Fixes: https://tracker.ceph.com/issues/69566 Related: https://tracker.ceph.com/issues/68033 Signed-off-by: Hoai-Thu Vuong <[email protected]>
thuvh
added a commit
to thuvh/ceph
that referenced
this pull request
Nov 30, 2026
Tracker ceph#69566 asks for a test covering the scenario where a Kafka broker rejects topic creation -- e.g. the topic already exists with conflicting ACLs. That is the same path that caused the crash in ceph#68033, where rd_kafka_topic_name() was called on a NULL rd_kafka_topic_t*. The crash itself was fixed in PR ceph#59741, but the post-fix branch in rgw_kafka.cc (publish_internal invoking the callback with a negative errno when rd_kafka_topic_new() returns NULL) was never exercised by an automated test: there was not even a C++ unit test for rgw_kafka, unlike the analogous amqp endpoint. Add a controllable kafka_mock and a unittest_rgw_kafka modeled on unittest_rgw_amqp. The mock lets tests force rd_kafka_topic_new() / rd_kafka_produce() to fail and toggle ack/nack on poll. The TopicCreationFailure test forces RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS and asserts the publish callback fires with a negative errno and no crash, so any future regression that revisits the NULL topic handle will surface in CI. The existing kafka_stub is kept as the high-priority link-fallback for general RGW test binaries, and is made link-compatible with the mock by declaring its rd_kafka_* symbols weak. The mock's strong symbols override the stub's weak ones when both are linked into the same binary (unittest_rgw_kafka links ${rgw_libs} kafka_mock), so the two libraries coexist with no list surgery and no multiple-definition conflict. Tests that link only the stub keep its no-op behavior unchanged. Fixes: https://tracker.ceph.com/issues/69566 Related: https://tracker.ceph.com/issues/68033 Signed-off-by: Hoai-Thu Vuong <[email protected]>
thuvh
added a commit
to thuvh/ceph
that referenced
this pull request
Nov 30, 2026
Tracker ceph#69566 asks for a test covering the scenario where a Kafka broker rejects topic creation -- e.g. the topic already exists with conflicting ACLs. That is the same path that caused the crash in ceph#68033, where rd_kafka_topic_name() was called on a NULL rd_kafka_topic_t*. The crash itself was fixed in PR ceph#59741, but the post-fix branch in rgw_kafka.cc (publish_internal invoking the callback with a negative errno when rd_kafka_topic_new() returns NULL) was never exercised by an automated test: there was not even a C++ unit test for rgw_kafka, unlike the analogous amqp endpoint. Add a controllable kafka_mock and a unittest_rgw_kafka modeled on unittest_rgw_amqp. The mock lets tests force rd_kafka_topic_new() / rd_kafka_produce() to fail and toggle ack/nack on poll. The TopicCreationFailure test forces RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS and asserts the publish callback fires with a negative errno and no crash, so any future regression that revisits the NULL topic handle will surface in CI. The existing kafka_stub is kept as the high-priority link-fallback for general RGW test binaries (its no-op behavior is unchanged). The mock is kept link-compatible with the stub by marking the stub's rd_kafka_* symbols weak (__attribute__((weak))) so that, in principle, a strong-definition mock can override them when both are linked together. In practice, static-archive pull-in is order-dependent, so unittest_rgw_kafka uses list(REMOVE_ITEM) to exclude kafka_stub from its lib list and links kafka_mock instead; the weak attributes stay as defense-in-depth documentation. No other test binary's link behavior changes. Fixes: https://tracker.ceph.com/issues/69566 Related: https://tracker.ceph.com/issues/68033 Signed-off-by: Hoai-Thu Vuong <[email protected]>
4 of 14 tasks
thuvh
added a commit
to thuvh/ceph
that referenced
this pull request
Nov 30, 2026
Tracker ceph#69566 asks for a test covering the scenario where a Kafka broker rejects the topic RGW tries to produce to -- e.g. the topic was already created with conflicting ACLs. That is the same path that caused the crash in ceph#68033, where rd_kafka_topic_name() was called on a NULL rd_kafka_topic_t*. The crash itself was fixed in PR ceph#59741, but the post-fix branch in rgw_kafka.cc (publish_internal invoking the callback with a negative errno on broker rejection, instead of dereferencing the topic handle) was never exercised by an automated test: there was not even a C++ unit test for rgw_kafka, unlike the analogous amqp endpoint. Rather than hand-rolling a mock of the librdkafka C API (which would duplicate librdkafka's own behavior for very little value), drive the *real* librdkafka linked into RGW against librdkafka's in-process mock cluster (rdkafka_mock.h, shipped with librdkafka >= 2.x; Ceph already requires rdkafka >= 2.11). The mock cluster speaks the Kafka wire protocol on localhost sockets, so rgw_kafka.cc exercises its real producer-creation / topic-handle / produce / delivery-report paths. rd_kafka_mock_topic_set_error() makes the broker return an error in Metadata responses for a given topic; librdkafka surfaces that as a produce delivery failure; rgw_kafka's post-ceph#59741 code fires the user callback with a negative errno instead of crashing. unittest_rgw_kafka covers: - TopicAuthorizationFailed: the ceph#69566 "already created with ACL" scenario (RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED in Metadata) - TopicAlreadyExists: the literal error in ceph#68033's description - PublishAck: the happy path, callback rc == 0 - ProduceFailure: broker rejects the produce itself (ApiKey 0 / ProduceRequest via rd_kafka_mock_push_request_errors) The existing kafka_stub is kept unchanged as the link-fallback for other RGW test binaries. unittest_rgw_kafka links the real RDKafka::RDKafka instead of kafka_stub (the two define the same rd_kafka_* symbols so they cannot coexist in one binary): the stub is dropped from its lib list via list(REMOVE_ITEM), as before. No other test binary's link behavior changes. Fixes: https://tracker.ceph.com/issues/69566 Related: https://tracker.ceph.com/issues/68033 Signed-off-by: Hoai-Thu Vuong <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.