]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/multisite: fix endpoint unreachable detection in RGWRESTConn sync paths
authorOguzhan Ozmen <oozmen@bloomberg.net>
Wed, 6 May 2026 19:17:55 +0000 (19:17 +0000)
committerOguzhan Ozmen <oozmen@bloomberg.net>
Thu, 4 Jun 2026 19:32:19 +0000 (19:32 +0000)
commit28f2a5e22afaae6794a1f6fe766b61ad0afe8024
tree8f1f8a5c4a549a6d50d1dc3ebfffc77b8c32f80c
parent3513cd888a0e6c6c879ef42823255c2e620a8fca
rgw/multisite: fix endpoint unreachable detection in RGWRESTConn sync 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 37352a9074 ("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 dbb409e21b9 ("rgw: fix
endpoint detection in RGWRESTConn") but that commit missed all .cc
sync paths.

Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
src/rgw/rgw_rest_conn.cc