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>