Allow backward compatible way to load creds from config.json (#6435)

Print warning message for users to migrate to newer style of distributed
deployment by always setting credentials as ENVs.

Fixes #6434
This commit is contained in:
Harshavardhana
2018-09-07 11:18:49 -07:00
committed by Dee Koder
parent e7a4512a90
commit 19202bae81
3 changed files with 22 additions and 14 deletions

View File

@@ -55,7 +55,7 @@ func saveServerConfig(ctx context.Context, objAPI ObjectLayer, config *serverCon
configFile := path.Join(minioConfigPrefix, minioConfigFile)
if globalEtcdClient != nil {
timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Minute)
_, err := globalEtcdClient.Put(timeoutCtx, configFile, string(data))
_, err = globalEtcdClient.Put(timeoutCtx, configFile, string(data))
defer cancel()
return err
}