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: v20.0.0~2186^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56704%2Fhead;p=ceph.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 --- diff --git a/src/rgw/rgw_http_errors.h b/src/rgw/rgw_http_errors.h index 5e052819e052..2f93cdf36d71 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 */