Add support for deployment ID (#6144)

deployment ID helps in identifying a minio deployment in the case of remote
logging targets.
This commit is contained in:
kannappanr
2018-07-18 20:17:35 -07:00
committed by GitHub
parent e8a008f5b5
commit 43cc0096fa
6 changed files with 314 additions and 11 deletions
+17
View File
@@ -186,6 +186,23 @@ func connectLoadInitFormats(firstDisk bool, endpoints EndpointList, setCount, dr
return nil, err
}
// Get the deploymentID if set.
format.ID, err = formatXLGetDeploymentID(format, formatConfigs)
if err != nil {
return nil, err
}
if format.ID == "" {
if err = formatXLFixDeploymentID(context.Background(), storageDisks, format); err != nil {
return nil, err
}
}
logger.SetDeploymentID(format.ID)
if err = formatXLFixLocalDeploymentID(context.Background(), storageDisks, format); err != nil {
return nil, err
}
return format, nil
}