mirror of
https://github.com/minio/minio.git
synced 2025-04-21 19:14:39 -04:00
Rename peer S3 prefix to avoid collision in the future (#16473)
This commit is contained in:
parent
1bf1fafc86
commit
441babdc41
@ -306,6 +306,7 @@ func setHTTPStatsHandler(h http.Handler) http.Handler {
|
|||||||
|
|
||||||
if strings.HasPrefix(r.URL.Path, storageRESTPrefix) ||
|
if strings.HasPrefix(r.URL.Path, storageRESTPrefix) ||
|
||||||
strings.HasPrefix(r.URL.Path, peerRESTPrefix) ||
|
strings.HasPrefix(r.URL.Path, peerRESTPrefix) ||
|
||||||
|
strings.HasPrefix(r.URL.Path, peerS3Prefix) ||
|
||||||
strings.HasPrefix(r.URL.Path, lockRESTPrefix) {
|
strings.HasPrefix(r.URL.Path, lockRESTPrefix) {
|
||||||
globalConnStats.incInputBytes(meteredRequest.BytesRead())
|
globalConnStats.incInputBytes(meteredRequest.BytesRead())
|
||||||
globalConnStats.incOutputBytes(meteredResponse.BytesWritten())
|
globalConnStats.incOutputBytes(meteredResponse.BytesWritten())
|
||||||
|
@ -403,6 +403,12 @@ func errorResponseHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
desc := "Do not upgrade one server at a time - please follow the recommended guidelines mentioned here https://github.com/minio/minio#upgrading-minio for your environment"
|
desc := "Do not upgrade one server at a time - please follow the recommended guidelines mentioned here https://github.com/minio/minio#upgrading-minio for your environment"
|
||||||
switch {
|
switch {
|
||||||
|
case strings.HasPrefix(r.URL.Path, peerS3Prefix):
|
||||||
|
writeErrorResponseString(r.Context(), w, APIError{
|
||||||
|
Code: "XMinioPeerS3VersionMismatch",
|
||||||
|
Description: desc,
|
||||||
|
HTTPStatusCode: http.StatusUpgradeRequired,
|
||||||
|
}, r.URL)
|
||||||
case strings.HasPrefix(r.URL.Path, peerRESTPrefix):
|
case strings.HasPrefix(r.URL.Path, peerRESTPrefix):
|
||||||
writeErrorResponseString(r.Context(), w, APIError{
|
writeErrorResponseString(r.Context(), w, APIError{
|
||||||
Code: "XMinioPeerVersionMismatch",
|
Code: "XMinioPeerVersionMismatch",
|
||||||
|
@ -33,7 +33,7 @@ const (
|
|||||||
peerS3Version = "v1" // First implementation
|
peerS3Version = "v1" // First implementation
|
||||||
|
|
||||||
peerS3VersionPrefix = SlashSeparator + peerS3Version
|
peerS3VersionPrefix = SlashSeparator + peerS3Version
|
||||||
peerS3Prefix = minioReservedBucketPath + "/peer"
|
peerS3Prefix = minioReservedBucketPath + "/peer-s3"
|
||||||
peerS3Path = peerS3Prefix + peerS3VersionPrefix
|
peerS3Path = peerS3Prefix + peerS3VersionPrefix
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user