mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
site replication turn off retry login for admin API calls (#18039)
additionally also mark site offline if n/w is down
This commit is contained in:
parent
ce05bb69dc
commit
b733e6e83c
@ -113,9 +113,10 @@ func init() {
|
||||
shardDiskTimeDelta = 1 * time.Minute
|
||||
}
|
||||
|
||||
// All minio-go API operations shall be performed only once,
|
||||
// All minio-go and madmin-go API operations shall be performed only once,
|
||||
// another way to look at this is we are turning off retries.
|
||||
minio.MaxRetry = 1
|
||||
madmin.MaxRetry = 1
|
||||
}
|
||||
|
||||
const consolePrefix = "CONSOLE_"
|
||||
|
@ -35,6 +35,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/minio/madmin-go/v3"
|
||||
"github.com/minio/minio-go/v7"
|
||||
minioClient "github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||
"github.com/minio/minio-go/v7/pkg/replication"
|
||||
@ -2119,6 +2120,13 @@ func (c *SiteReplicationSys) concDo(selfActionFn func() error, peerActionFn func
|
||||
errMap := make(map[string]error, len(c.state.Peers))
|
||||
for i, depID := range depIDs {
|
||||
errMap[depID] = errs[i]
|
||||
if errs[i] != nil && minio.IsNetworkOrHostDown(errs[i], true) {
|
||||
ep := c.state.Peers[depID].Endpoint
|
||||
epURL, _ := url.Parse(ep)
|
||||
if !globalBucketTargetSys.isOffline(epURL) {
|
||||
globalBucketTargetSys.markOffline(epURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
return c.newConcErr(errMap, actionName)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user