From: Casey Bodley Date: Thu, 4 Apr 2024 14:38:02 +0000 (-0400) Subject: rgw: don't map to EIO in rgw_http_error_to_errno() X-Git-Tag: testing/wip-yuriw-testing-20240416.150233~9^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7b9af32e28fbc823e1d9b348484039761907a52a;p=ceph-ci.git rgw: don't map to EIO in rgw_http_error_to_errno() the http client uses EIO to detect connection errors specifically. if we map normal http errors to EIO, we incorrectly mark their endpoint as failed and route requests to other endpoints (if any exist) default to ERR_INTERNAL_ERROR (500 InternalError) instead Signed-off-by: Casey Bodley (cherry picked from commit 37352a90740960407a07977dd7236156b803dd63) --- diff --git a/src/rgw/rgw_http_errors.h b/src/rgw/rgw_http_errors.h index 5e052819e05..2f93cdf36d7 100644 --- a/src/rgw/rgw_http_errors.h +++ b/src/rgw/rgw_http_errors.h @@ -37,7 +37,7 @@ static inline int rgw_http_error_to_errno(int http_err) case 503: return -EBUSY; default: - return -EIO; + return -ERR_INTERNAL_ERROR; } return 0; /* unreachable */