mirror of
https://github.com/minio/minio.git
synced 2025-07-08 08:32:18 -04: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
|
// The name of this local node, fetched from arguments
|
||||||
globalLocalNodeName string
|
globalLocalNodeName string
|
||||||
globalLocalNodeNameHex string
|
globalLocalNodeNameHex string
|
||||||
globalNodeNamesHex map[string]struct{}
|
globalNodeNamesHex = make(map[string]struct{})
|
||||||
|
|
||||||
// The global subnet config
|
// The global subnet config
|
||||||
globalSubnetConfig subnet.Config
|
globalSubnetConfig subnet.Config
|
||||||
|
@ -251,15 +251,6 @@ func serverHandleCmdArgs(ctx *cli.Context) {
|
|||||||
globalLocalNodeName = GetLocalPeer(globalEndpoints, globalMinioHost, globalMinioPort)
|
globalLocalNodeName = GetLocalPeer(globalEndpoints, globalMinioHost, globalMinioPort)
|
||||||
nodeNameSum := sha256.Sum256([]byte(globalLocalNodeName))
|
nodeNameSum := sha256.Sum256([]byte(globalLocalNodeName))
|
||||||
globalLocalNodeNameHex = hex.EncodeToString(nodeNameSum[:])
|
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.
|
// allow transport to be HTTP/1.1 for proxying.
|
||||||
globalProxyTransport = NewCustomHTTPProxyTransport()()
|
globalProxyTransport = NewCustomHTTPProxyTransport()()
|
||||||
@ -641,6 +632,15 @@ func serverMain(ctx *cli.Context) {
|
|||||||
xhttp.SetDeploymentID(globalDeploymentID)
|
xhttp.SetDeploymentID(globalDeploymentID)
|
||||||
xhttp.SetMinIOVersion(Version)
|
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")
|
bootstrapTrace("newSharedLock")
|
||||||
globalLeaderLock = newSharedLock(GlobalContext, newObject, "leader.lock")
|
globalLeaderLock = newSharedLock(GlobalContext, newObject, "leader.lock")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user