mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
Do not freeze s3 traffic in healthinfo api (#15912)
This commit is contained in:
parent
bd77f1df4c
commit
5aba2aedb3
@ -1988,12 +1988,6 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque
|
|||||||
healthCtx, healthCancel := context.WithTimeout(lkctx.Context(), deadline)
|
healthCtx, healthCancel := context.WithTimeout(lkctx.Context(), deadline)
|
||||||
defer healthCancel()
|
defer healthCancel()
|
||||||
|
|
||||||
// Freeze all incoming S3 API calls before running speedtest.
|
|
||||||
globalNotificationSys.ServiceFreeze(ctx, true)
|
|
||||||
|
|
||||||
// unfreeze all incoming S3 API calls after speedtest.
|
|
||||||
defer globalNotificationSys.ServiceFreeze(ctx, false)
|
|
||||||
|
|
||||||
hostAnonymizer := createHostAnonymizer()
|
hostAnonymizer := createHostAnonymizer()
|
||||||
// anonAddr - Anonymizes hosts in given input string.
|
// anonAddr - Anonymizes hosts in given input string.
|
||||||
anonAddr := func(addr string) string {
|
anonAddr := func(addr string) string {
|
||||||
@ -2139,7 +2133,10 @@ func (a adminAPIHandlers) HealthInfoHandler(w http.ResponseWriter, r *http.Reque
|
|||||||
if !globalIsDistErasure {
|
if !globalIsDistErasure {
|
||||||
// FS mode - single server - hard code to `server1`
|
// FS mode - single server - hard code to `server1`
|
||||||
anonCmdLine := strings.ReplaceAll(cmdLine, globalLocalNodeName, "server1")
|
anonCmdLine := strings.ReplaceAll(cmdLine, globalLocalNodeName, "server1")
|
||||||
return strings.ReplaceAll(anonCmdLine, globalMinioConsoleHost, "server1")
|
if len(globalMinioConsoleHost) > 0 {
|
||||||
|
anonCmdLine = strings.ReplaceAll(anonCmdLine, globalMinioConsoleHost, "server1")
|
||||||
|
}
|
||||||
|
return anonCmdLine
|
||||||
}
|
}
|
||||||
|
|
||||||
// Server start command regex groups:
|
// Server start command regex groups:
|
||||||
|
Loading…
Reference in New Issue
Block a user