mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Set Deployment ID before starting handlers (#9635)
Global handler ID is added to response headers, so initialize it before the server starts. Fixes #9634
This commit is contained in:
parent
1bc32215b9
commit
1847f17f50
@ -96,6 +96,10 @@ func ValidateGatewayArguments(serverAddr, endpointAddr string) error {
|
|||||||
|
|
||||||
// StartGateway - handler for 'minio gateway <name>'.
|
// StartGateway - handler for 'minio gateway <name>'.
|
||||||
func StartGateway(ctx *cli.Context, gw Gateway) {
|
func StartGateway(ctx *cli.Context, gw Gateway) {
|
||||||
|
// This is only to uniquely identify each gateway deployments.
|
||||||
|
globalDeploymentID = env.Get("MINIO_GATEWAY_DEPLOYMENT_ID", mustGetUUID())
|
||||||
|
logger.SetDeploymentID(globalDeploymentID)
|
||||||
|
|
||||||
if gw == nil {
|
if gw == nil {
|
||||||
logger.FatalIf(errUnexpected, "Gateway implementation not initialized")
|
logger.FatalIf(errUnexpected, "Gateway implementation not initialized")
|
||||||
}
|
}
|
||||||
@ -260,9 +264,6 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
|||||||
// is only enabled for "NAS" gateway.
|
// is only enabled for "NAS" gateway.
|
||||||
globalConfigSys.WatchConfigNASDisk(GlobalContext, newObject)
|
globalConfigSys.WatchConfigNASDisk(GlobalContext, newObject)
|
||||||
}
|
}
|
||||||
// This is only to uniquely identify each gateway deployments.
|
|
||||||
globalDeploymentID = env.Get("MINIO_GATEWAY_DEPLOYMENT_ID", mustGetUUID())
|
|
||||||
logger.SetDeploymentID(globalDeploymentID)
|
|
||||||
|
|
||||||
if globalEtcdClient != nil {
|
if globalEtcdClient != nil {
|
||||||
// **** WARNING ****
|
// **** WARNING ****
|
||||||
|
Loading…
Reference in New Issue
Block a user