summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/SSHbase.py
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2015-07-24 01:13:47 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2015-07-27 14:43:26 +0200
commitf2acd697d69351be036ffb089b8244accfe8ae06 (patch)
tree53ef2d78c711347a6e4a7488d3717efe59f4ab31 /src/lib/Bcfg2/Server/Plugins/SSHbase.py
parentf4d9a230d237a9b412e8056629ec1dee1ce478c3 (diff)
downloadbcfg2-f2acd697d69351be036ffb089b8244accfe8ae06.tar.gz
bcfg2-f2acd697d69351be036ffb089b8244accfe8ae06.tar.bz2
bcfg2-f2acd697d69351be036ffb089b8244accfe8ae06.zip
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.
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/SSHbase.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/SSHbase.py4
1 files changed, 4 insertions, 0 deletions
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':