From f2acd697d69351be036ffb089b8244accfe8ae06 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 24 Jul 2015 01:13:47 +0200 Subject: SSHbase: Expire metadata cache on pubkey event SSHbase supply the public keyfiles as additional metadata, so we need to expire the metadata cache if we get an event for such file. We would only need to expire the metadata cache for hosts, that reference that exact file (host or group specific) but we cannot get this information, so that we simply expire the metadata cache for all hosts. --- src/lib/Bcfg2/Server/Plugins/SSHbase.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/Bcfg2/Server/Plugins/SSHbase.py b/src/lib/Bcfg2/Server/Plugins/SSHbase.py index 7736bd050..7f20e72eb 100644 --- a/src/lib/Bcfg2/Server/Plugins/SSHbase.py +++ b/src/lib/Bcfg2/Server/Plugins/SSHbase.py @@ -286,6 +286,10 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin, self.debug_log("New public key %s; invalidating " "ssh_known_hosts cache" % event.filename) self.skn = False + + if self.core.metadata_cache_mode in ['cautious', + 'aggressive']: + self.core.metadata_cache.expire() return if event.filename == 'info.xml': -- cgit v1.2.3-1-g7c22