diff --git a/types/options.go b/types/options.go index 03e5f7ab64..847cf5f1f4 100644 --- a/types/options.go +++ b/types/options.go @@ -418,8 +418,13 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) erro meta, err := toml.DecodeFile(configFile, &config) if err == nil { keys := meta.Undecoded() - if len(keys) > 0 { - logrus.Warningf("Failed to decode the keys %q from %q", keys, configFile) + for _, key := range keys { + // Since thinpool was removed older storage.conf files + // will generate bogus warnings + if key.String() == "storage.options.thinpool" { + continue + } + logrus.Warningf("Failed to decode the key %q from %q", key, configFile) } } else { if !os.IsNotExist(err) { diff --git a/types/options_test.go b/types/options_test.go index 26facc7a86..c647e7e87b 100644 --- a/types/options_test.go +++ b/types/options_test.go @@ -204,5 +204,5 @@ func TestReloadConfigurationFile(t *testing.T) { assert.Equal(t, storageOpts.RunRoot, "/run/containers/test") logrus.SetOutput(os.Stderr) - assert.Equal(t, strings.Contains(content.String(), "Failed to decode the keys [\\\"foo\\\" \\\"storage.options.graphroot\\\"] from \\\"./storage_broken.conf\\\"\""), true) + assert.Equal(t, strings.Contains(content.String(), "Failed to decode the key \\\"foo\\\" from \\\"./storage_broken.conf\\\"\""), true) }