From b8ce6f34890f8dd951b1158cc040f2bcbe0e91fe Mon Sep 17 00:00:00 2001 From: Vincent Janelle Date: Wed, 14 Nov 2018 12:03:22 -0800 Subject: [PATCH] (#476) Add configuration flag to always overwrite the cache Support configuration where local file cache of certificates is always overwritten Fix fact discovery so that ginkgo works locally --- config/config.go | 9 +++++---- server/discovery/facts/facts.go | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/config.go b/config/config.go index 8927caa09..6f82ebd91 100644 --- a/config/config.go +++ b/config/config.go @@ -77,10 +77,11 @@ type ChoriaPluginConfig struct { RubyLibdir []string `confkey:"plugin.choria.agent_provider.mcorpc.libdir" type:"path_split"` // security plugin - PrivilegedUsers []string `confkey:"plugin.choria.security.privileged_users" type:"comma_split" default:"\\.privileged.mcollective$"` - CertnameWhitelist []string `confkey:"plugin.choria.security.certname_whitelist" type:"comma_split" default:"\\.mcollective$"` - Serializer string `confkey:"plugin.choria.security.serializer" validate:"enum=json,yaml"` - SecurityProvider string `confkey:"plugin.security.provider" default:"puppet" validate:"enum=puppet,file"` + PrivilegedUsers []string `confkey:"plugin.choria.security.privileged_users" type:"comma_split" default:"\\.privileged.mcollective$"` + CertnameWhitelist []string `confkey:"plugin.choria.security.certname_whitelist" type:"comma_split" default:"\\.mcollective$"` + Serializer string `confkey:"plugin.choria.security.serializer" validate:"enum=json,yaml"` + SecurityProvider string `confkey:"plugin.security.provider" default:"puppet" validate:"enum=puppet,file"` + SecurityAlwaysOverwriteCache bool `confkey:"plugin.security.provider.always_overwrite_cache" default:"false"` // file security FileSecurityCertificate string `confkey:"plugin.security.file.certificate"` diff --git a/server/discovery/facts/facts.go b/server/discovery/facts/facts.go index 255523c6c..fd74a0b91 100644 --- a/server/discovery/facts/facts.go +++ b/server/discovery/facts/facts.go @@ -28,7 +28,7 @@ func Match(filters [][3]string, fw *choria.Framework, log *logrus.Entry) bool { } if matched == false { - log.Debug("Failed to match fact filter '%#v'", filter) + log.Debugf("Failed to match fact filter '%#v'", filter) break } }