X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/cef860fc944f66b4b52aa2ea6d66561944a7c065..bd855b0c92549d5cdcabc7a312166e4a6b556697:/lib/config/deprecated.go diff --git a/lib/config/deprecated.go b/lib/config/deprecated.go index acaf0c5da7..5e68bbfcef 100644 --- a/lib/config/deprecated.go +++ b/lib/config/deprecated.go @@ -123,7 +123,7 @@ func (ldr *Loader) applyDeprecatedConfig(cfg *arvados.Config) error { func (ldr *Loader) applyDeprecatedVolumeDriverParameters(cfg *arvados.Config) error { for clusterID, cluster := range cfg.Clusters { for volID, vol := range cluster.Volumes { - if vol.Driver == "s3" { + if vol.Driver == "S3" { var params struct { AccessKey string `json:",omitempty"` SecretKey string `json:",omitempty"` @@ -136,7 +136,7 @@ func (ldr *Loader) applyDeprecatedVolumeDriverParameters(cfg *arvados.Config) er } if params.AccessKey != "" || params.SecretKey != "" { if params.AccessKeyID != "" || params.SecretAccessKey != "" { - ldr.Logger.Warnf("ignoring old config keys %s.Volumes.%s.DriverParameters.AccessKey/SecretKey because new keys AccessKeyID/SecretAccessKey are also present", clusterID, volID) + return fmt.Errorf("cannot use old keys (AccessKey/SecretKey) and new keys (AccessKeyID/SecretAccessKey) at the same time in %s.Volumes.%s.DriverParameters -- you must remove the old config keys", clusterID, volID) continue } var allparams map[string]interface{} @@ -149,6 +149,7 @@ func (ldr *Loader) applyDeprecatedVolumeDriverParameters(cfg *arvados.Config) er delete(allparams, k) } } + ldr.Logger.Warnf("using your old config keys %s.Volumes.%s.DriverParameters.AccessKey/SecretKey -- but you should rename them to AccessKeyID/SecretAccessKey", clusterID, volID) allparams["AccessKeyID"] = params.AccessKey allparams["SecretAccessKey"] = params.SecretKey vol.DriverParameters, err = json.Marshal(allparams)