Avoid pointer based copy, instead use Clone() (#8547)

This PR adds functional test to test expanded
cluster syntax.
This commit is contained in:
Harshavardhana
2019-11-21 04:24:51 -08:00
committed by Nitish Tiwari
parent 9565641b9b
commit 4e9de58675
18 changed files with 198 additions and 165 deletions

View File

@@ -146,9 +146,9 @@ func serverHandleCmdArgs(ctx *cli.Context) {
endpoints := strings.Fields(env.Get(config.EnvEndpoints, ""))
if len(endpoints) > 0 {
globalEndpoints, setupType, err = createServerEndpoints(globalCLIContext.Addr, endpoints...)
globalEndpoints, globalXLSetDriveCount, setupType, err = createServerEndpoints(globalCLIContext.Addr, endpoints...)
} else {
globalEndpoints, setupType, err = createServerEndpoints(globalCLIContext.Addr, ctx.Args()...)
globalEndpoints, globalXLSetDriveCount, setupType, err = createServerEndpoints(globalCLIContext.Addr, ctx.Args()...)
}
logger.FatalIf(err, "Invalid command line arguments")
@@ -437,17 +437,5 @@ func newObjectLayer(endpointZones EndpointZones) (newObject ObjectLayer, err err
return NewFSObjectLayer(endpointZones[0].Endpoints[0].Path)
}
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
}
if deploymentID == "" {
deploymentID = formats[i].ID
}
}
return newXLZones(endpointZones, formats)
return newXLZones(endpointZones)
}