diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-05 14:36:15 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-09-05 14:55:33 -0400 |
commit | cd7b0b3d40a5a340d5b47819f94a21c9faf23120 (patch) | |
tree | 67dc3b8f53b0921aade0ba5603d5f1c9cff85eb5 /src/lib/Bcfg2/Server/Plugins/PuppetENC.py | |
parent | 84e8fc36c4d8524c8094daf31955dce8c0a624ea (diff) | |
download | bcfg2-cd7b0b3d40a5a340d5b47819f94a21c9faf23120.tar.gz bcfg2-cd7b0b3d40a5a340d5b47819f94a21c9faf23120.tar.bz2 bcfg2-cd7b0b3d40a5a340d5b47819f94a21c9faf23120.zip |
added server-side client metadata object caching
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/PuppetENC.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/PuppetENC.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/PuppetENC.py b/src/lib/Bcfg2/Server/Plugins/PuppetENC.py index 46182e9a2..341d63118 100644 --- a/src/lib/Bcfg2/Server/Plugins/PuppetENC.py +++ b/src/lib/Bcfg2/Server/Plugins/PuppetENC.py @@ -112,6 +112,16 @@ class PuppetENC(Bcfg2.Server.Plugin.Plugin, separately; and b) when a single client's metadata is generated multiple times by separate templates """ self.cache = dict() + if self.core.metadata_cache_mode == 'aggressive': + # clear the metadata client cache if we're in aggressive + # mode, and produce a warning. PuppetENC really isn't + # compatible with aggressive mode, since we don't know + # when the output from a given ENC has changed, and thus + # can't invalidate the cache sanely. + self.logger.warning("PuppetENC is incompatible with aggressive " + "client metadata caching, try 'cautious' or " + "'initial' instead") + self.core.cache.expire() def end_statistics(self, metadata): self.end_client_run(self, metadata) |