mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
allow site-replication checks to work on non-distributed setups (#17524)
fixes #17523
This commit is contained in:
parent
c1943ea3af
commit
d3e5e607a7
@ -232,7 +232,7 @@ var (
|
||||
// The name of this local node, fetched from arguments
|
||||
globalLocalNodeName string
|
||||
globalLocalNodeNameHex string
|
||||
globalNodeNamesHex map[string]struct{}
|
||||
globalNodeNamesHex = make(map[string]struct{})
|
||||
|
||||
// The global subnet config
|
||||
globalSubnetConfig subnet.Config
|
||||
|
@ -251,15 +251,6 @@ func serverHandleCmdArgs(ctx *cli.Context) {
|
||||
globalLocalNodeName = GetLocalPeer(globalEndpoints, globalMinioHost, globalMinioPort)
|
||||
nodeNameSum := sha256.Sum256([]byte(globalLocalNodeName))
|
||||
globalLocalNodeNameHex = hex.EncodeToString(nodeNameSum[:])
|
||||
globalNodeNamesHex = make(map[string]struct{})
|
||||
for _, n := range globalNodes {
|
||||
nodeName := n.Host
|
||||
if n.IsLocal {
|
||||
nodeName = globalLocalNodeName
|
||||
}
|
||||
nodeNameSum := sha256.Sum256([]byte(nodeName))
|
||||
globalNodeNamesHex[hex.EncodeToString(nodeNameSum[:])] = struct{}{}
|
||||
}
|
||||
|
||||
// allow transport to be HTTP/1.1 for proxying.
|
||||
globalProxyTransport = NewCustomHTTPProxyTransport()()
|
||||
@ -641,6 +632,15 @@ func serverMain(ctx *cli.Context) {
|
||||
xhttp.SetDeploymentID(globalDeploymentID)
|
||||
xhttp.SetMinIOVersion(Version)
|
||||
|
||||
for _, n := range globalNodes {
|
||||
nodeName := n.Host
|
||||
if n.IsLocal {
|
||||
nodeName = globalLocalNodeName
|
||||
}
|
||||
nodeNameSum := sha256.Sum256([]byte(nodeName + globalDeploymentID))
|
||||
globalNodeNamesHex[hex.EncodeToString(nodeNameSum[:])] = struct{}{}
|
||||
}
|
||||
|
||||
bootstrapTrace("newSharedLock")
|
||||
globalLeaderLock = newSharedLock(GlobalContext, newObject, "leader.lock")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user