mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
Preserve same deploymentID on all zones (#8542)
This commit is contained in:
committed by
Nitish Tiwari
parent
347b29d059
commit
8392d2f510
@@ -208,7 +208,7 @@ func initSafeModeInit(buckets []BucketInfo) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
defer func(objLock RWLocker) {
|
||||
objLock.Unlock()
|
||||
|
||||
if err != nil {
|
||||
@@ -226,7 +226,7 @@ func initSafeModeInit(buckets []BucketInfo) (err error) {
|
||||
// not proceeding waiting for admin action.
|
||||
handleSignals()
|
||||
}
|
||||
}()
|
||||
}(objLock)
|
||||
|
||||
// Calls New() for all sub-systems.
|
||||
newAllSubsystems()
|
||||
@@ -437,13 +437,17 @@ func newObjectLayer(endpointZones EndpointZones) (newObject ObjectLayer, err err
|
||||
return NewFSObjectLayer(endpointZones[0].Endpoints[0].Path)
|
||||
}
|
||||
|
||||
var formats []*formatXLV3
|
||||
for _, ep := range endpointZones {
|
||||
format, err := waitForFormatXL(ep.Endpoints[0].IsLocal, ep.Endpoints, ep.SetCount, ep.DrivesPerSet)
|
||||
var formats = make([]*formatXLV3, len(endpointZones))
|
||||
var deploymentID string
|
||||
for i, ep := range endpointZones {
|
||||
formats[i], err = waitForFormatXL(ep.Endpoints[0].IsLocal, ep.Endpoints,
|
||||
ep.SetCount, ep.DrivesPerSet, deploymentID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
formats = append(formats, format)
|
||||
if deploymentID == "" {
|
||||
deploymentID = formats[i].ID
|
||||
}
|
||||
}
|
||||
return newXLZones(endpointZones, formats)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user