Repository navigation
rgw/multisite: Balance sync traffic across DNS-resolved backends using CURLOPT_CONNECT_TO - #67141
Conversation
Config Diff Tool Output+ added: rgw_rest_conn_connect_to_resolved_ips (rgw.yaml.in)
+ added: rgw_rest_conn_ip_fail_timeout_secs (rgw.yaml.in)
The above configuration changes are found in the PR. Please update the relevant release documentation if necessary. |
ffa13a2 to
ad84734
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
387c55f to
be20d73
Compare
be20d73 to
9775dbd
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
9775dbd to
04304df
Compare
|
Although there's some on-going issues in teuthology due to centos->rocky migration, I submitted the changes to tuethology to see how the changes pan out:
Due to on-going teuthology issues, I'll need to run these again but at least these runs show no immediate issues with this change:
At the fist sight, one may think enabling_resolving might be causing some issues but they are all accoutanable and due to centos->rocky migration:
[*] The other run (BASELINE) also passed I believe, it just failed at cleanup and I had seen this issue before: rgw/verifyThis difference was sort of alarming but comparing both runs show that it's due to known Rocky 10 issue with ragweed [*].
[*]: |
cdf2140 to
330363c
Compare
…e vector Previously RGWRESTConn stored endpoints in two data structures: - endpoint_urls: vector<string> for ordered round-robin iteration - resolved_endpoints: unordered_map<string, ResolvedEndpoint> for lookup This was redundant since the URL was stored in both places. Signed-off-by: Oguzhan Ozmen <[email protected]>
Signed-off-by: Oguzhan Ozmen <[email protected]>
Previously, when a connection to a zone endpoint failed, the entire endpoint was marked as unavailable for a timeout period. Since we now resolve endpoints to all their IP addresses (via DNS A/AAAA records), we can be more granular: track failures at the individual IP level. Introduce ResolvedIP struct that pairs each IP's connect_to string with its own failure timestamp. When selecting an IP for a request, round-robin skips IPs that have recently failed, allowing traffic to continue flowing to healthy nodes even when some are down. An endpoint-level last_failure_time is maintained as a fast-path optimization to avoid scanning all IPs when none have failed recently. Signed-off-by: Oguzhan Ozmen <[email protected]>
Introduce a new radosgw option 'rgw_rest_conn_ip_fail_timeout_secs' to be able to set the constant CONN_STATUS_EXPIRE_SECS dynamically. Signed-off-by: Oguzhan Ozmen <[email protected]>
Adds a new admin socket command to dump zone connection details including endpoints, resolved IPs, and health status. Useful for debugging multisite connectivity issues. Usage: ceph daemon <radosgw.asok> zone connections Signed-off-by: Oguzhan Ozmen <[email protected]>
Rename endpoint_round_robin_counter to endpoint_rr_index and endpoint_ips_round_robin_counter to ip_rr_index for shorter, cleaner variable names while maintaining clarity. Signed-off-by: Oguzhan Ozmen <[email protected]>
…t_conn_ip_fail_timeout_secs Expose the confval information for the confval "rgw_rest_conn_connect_to_resolved_ips" and "rgw_rest_conn_ip_fail_timeout_secs" so that they can be seen in the "Ceph Object Gateway Config Reference" as these are meant to be client-facing configs. Signed-off-by: Oguzhan Ozmen <[email protected]>
507ecf3 to
da3813e
Compare
|
@cbodley I believe pending review comments have been addressed. Please have a look. If it looks good; let me start another round of teuthology testing; I think this will be the 10th time for this PR incl reruns :)
I had to a couple rebases as this one is getting older and the last time I said what-the-heck let me use the github's "resolve conflicts" button/UI down there. Somehow, it added this commit then. I think I need to stick with the good-old manual-rebase and vim to resolve-conflicts; doing it via a UI seems to be confusing. |
cbodley
left a comment
There was a problem hiding this comment.
changes look great, thank you
|
@smanjara any specific testing you'd like to see here? we do have the qa/tasks/dnsmasq.py task if we want to set up a special dns configuration for this in the rgw/multisite suite, though it might not be easy to verify that sync uses all of the configured endpoints |
Replace raw string manipulation in RGWEndpoint with boost::urls::url. URL path/query/host changes now use set_path(), set_query(), set_host() instead of string concatenation. Rename original_url to endpoint_url_lookup_id to clarify its role as a health-tracking key for ResolvedEndpoint lookup in set_endpoint_unconnectable(). Signed-off-by: Oguzhan Ozmen <[email protected]>
… paths The checks that decide whether to call set_endpoint_unconnectable() were comparing against -EIO, but the actual error codes returned on connection failure changed after commit 37352a9 ("rgw: change rgw_http_error_to_errno default to -ERR_INTERNAL_ERROR"). - complete_request() -> wait() returns req_data->ret which is set to rgw_http_error_to_errno(0) = -ERR_INTERNAL_ERROR when http_status is 0 (TCP connect failed). Fix the six call sites to check -ERR_INTERNAL_ERROR. - forward_request() returns tl::unexpected(-ERR_SERVICE_UNAVAILABLE) when http_status == 0 (no HTTP response received at all). Fix the two forward/forward_iam conditionals to check -ERR_SERVICE_UNAVAILABLE. Without this fix, connection failures are never detected in the sync paths, so set_endpoint_unconnectable() is never called and the IP failover / retry logic is effectively dead. The .h coroutine paths were already fixed by dbb409e ("rgw: fix endpoint detection in RGWRESTConn") but that commit missed all .cc sync paths. Signed-off-by: Oguzhan Ozmen <[email protected]>
Signed-off-by: Oguzhan Ozmen <[email protected]>
12fa9cd to
69616b2
Compare
|
Below are the new teuthology run results after addressing the new comments from last week: Test branches
QA test results
ConclusionBoth branches seem clean. All 10 failures in the option-disabled and all 9 in the option-enabled run are pre-existing infrastructure issues or known flaky tests:
More detailswip-oozmen-dns-resolver-testing-2026-06-03-1802
wip-oozmen-dns-resolver-enabled-testing-2026-06-03-1802
@cbodley / @smanjara / @mkogan1 - can you please review the test results and let me know do we need any further testing on this one? |
|
jenkins test make check arm64 |
cbodley
left a comment
There was a problem hiding this comment.
it doesn't need to block merge, but lets put some more thought into how we can add some regression test coverage here. since this isn't on by default, multisite tests won't tell us if we break something here in the future
anthonyeleven
left a comment
There was a problem hiding this comment.
One minor suggestion.
…olution Documents the new rgw_rest_conn_connect_to_resolved_ips feature that enables RGW to resolve HTTP endpoints for RGW services such as multisite, into all IP addresses and distribute requests across them using round-robin with per-IP health tracking, supporting DNS service discovery deployments without external load balancers. Signed-off-by: Oguzhan Ozmen <[email protected]>
69616b2 to
fe6af7f
Compare
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
Fixes https://tracker.ceph.com/issues/74677.
Added
/config check okcomment as the config items are added to the related release doc.Testing
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.