[ARVADOS] updated: 2.1.0-770-gd5666a360
Git user
git at public.arvados.org
Fri May 7 14:34:43 UTC 2021
Summary of changes:
lib/config/deprecated.go | 2 +-
lib/config/deprecated_test.go | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
via d5666a360beedb7036aae830bbc4058a6d9c82fc (commit)
from 1acd7bc736df6bc2b3030f1553bb4492a749d10a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit d5666a360beedb7036aae830bbc4058a6d9c82fc
Author: Tom Clegg <tom at curii.com>
Date: Fri May 7 10:33:10 2021 -0400
17590: Error out if both old+new S3 credential configs are provided.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/config/deprecated.go b/lib/config/deprecated.go
index aac981da4..5e68bbfce 100644
--- a/lib/config/deprecated.go
+++ b/lib/config/deprecated.go
@@ -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{}
diff --git a/lib/config/deprecated_test.go b/lib/config/deprecated_test.go
index 383f03d05..7cb169c61 100644
--- a/lib/config/deprecated_test.go
+++ b/lib/config/deprecated_test.go
@@ -74,6 +74,19 @@ Clusters:
c.Check(logs, check.Matches, `(?ms).*deprecated or unknown config entry: .*AccessKey.*`)
c.Check(logs, check.Matches, `(?ms).*deprecated or unknown config entry: .*SecretKey.*`)
c.Check(logs, check.Matches, `(?ms).*using your old config keys z1111\.Volumes\.z1111-nyw5e-aaaaaaaaaaaaaaa\.DriverParameters\.AccessKey/SecretKey -- but you should rename them to AccessKeyID/SecretAccessKey.*`)
+
+ _, err := testLoader(c, `
+Clusters:
+ z1111:
+ Volumes:
+ z1111-nyw5e-aaaaaaaaaaaaaaa:
+ Driver: S3
+ DriverParameters:
+ AccessKey: exampleaccesskey
+ SecretKey: examplesecretkey
+ AccessKeyID: exampleaccesskey
+`, nil).Load()
+ c.Check(err, check.ErrorMatches, `(?ms).*cannot use .*SecretKey.*and.*SecretAccessKey.*in z1111.Volumes.z1111-nyw5e-aaaaaaaaaaaaaaa.DriverParameters.*`)
}
func (s *LoadSuite) TestDeprecatedNodeProfilesToServices(c *check.C) {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list