mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
fix: disable site network test if site replication is disabled (#17579)
This commit is contained in:
@@ -1164,6 +1164,11 @@ func (a adminAPIHandlers) SitePerfHandler(w http.ResponseWriter, r *http.Request
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !globalSiteReplicationSys.isEnabled() {
|
||||||
|
writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrNotImplemented), r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
nsLock := objectAPI.NewNSLock(minioMetaBucket, "site-net-perf")
|
nsLock := objectAPI.NewNSLock(minioMetaBucket, "site-net-perf")
|
||||||
lkctx, err := nsLock.GetLock(ctx, globalOperationTimeout)
|
lkctx, err := nsLock.GetLock(ctx, globalOperationTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user