17829: Fix test
[arvados.git] / lib / config / deprecated.go
index 8306f814f0cc0d61d8858c776377e9507dd49845..5e68bbfcefa7950163791d66a6a533bc65c19097 100644 (file)
@@ -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{}