1
0
mirror of https://github.com/minio/minio synced 2024-07-05 17:08:43 +00:00

fix: disable site network test if site replication is disabled (#17579)

This commit is contained in:
jiuker 2023-07-07 00:19:14 +08:00 committed by GitHub
parent 8af0773baf
commit c47ff44f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1164,6 +1164,11 @@ func (a adminAPIHandlers) SitePerfHandler(w http.ResponseWriter, r *http.Request
return
}
if !globalSiteReplicationSys.isEnabled() {
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrNotImplemented), r.URL)
return
}
nsLock := objectAPI.NewNSLock(minioMetaBucket, "site-net-perf")
lkctx, err := nsLock.GetLock(ctx, globalOperationTimeout)
if err != nil {