mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #45358 from UtahDave/gate_data_cache_refresh
gate the minion data cache refresh events.
This commit is contained in:
commit
541e59fa75
4 changed files with 24 additions and 2 deletions
|
@ -973,6 +973,22 @@ a minion performs an authentication check with the master.
|
|||
|
||||
auth_events: True
|
||||
|
||||
.. conf_master:: minion_data_cache_events
|
||||
|
||||
``minion_data_cache_events``
|
||||
--------------------
|
||||
|
||||
.. versionadded:: 2017.7.3
|
||||
|
||||
Default: ``True``
|
||||
|
||||
Determines whether the master will fire minion data cache events. Minion data
|
||||
cache events are fired when a minion requests a minion data cache refresh.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
minion_data_cache_events: True
|
||||
|
||||
.. _salt-ssh-configuration:
|
||||
|
||||
Salt-SSH Configuration
|
||||
|
|
|
@ -1087,6 +1087,9 @@ VALID_OPTS = {
|
|||
|
||||
# Whether to fire auth events
|
||||
'auth_events': bool,
|
||||
|
||||
# Whether to fire Minion data cache refresh events
|
||||
'minion_data_cache_events': bool,
|
||||
}
|
||||
|
||||
# default configurations
|
||||
|
@ -1654,6 +1657,7 @@ DEFAULT_MASTER_OPTS = {
|
|||
'drop_messages_signature_fail': False,
|
||||
'schedule': {},
|
||||
'auth_events': True,
|
||||
'minion_data_cache_events': True,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -741,7 +741,8 @@ class RemoteFuncs(object):
|
|||
self.cache.store('minions/{0}'.format(load['id']),
|
||||
'data',
|
||||
{'grains': load['grains'], 'pillar': data})
|
||||
self.event.fire_event('Minion data cache refresh', tagify(load['id'], 'refresh', 'minion'))
|
||||
if self.opts.get('minion_data_cache_events') is True:
|
||||
self.event.fire_event('Minion data cache refresh', tagify(load['id'], 'refresh', 'minion'))
|
||||
return data
|
||||
|
||||
def _minion_event(self, load):
|
||||
|
|
|
@ -1355,7 +1355,8 @@ class AESFuncs(object):
|
|||
'data',
|
||||
{'grains': load['grains'],
|
||||
'pillar': data})
|
||||
self.event.fire_event({'Minion data cache refresh': load['id']}, tagify(load['id'], 'refresh', 'minion'))
|
||||
if self.opts.get('minion_data_cache_events') is True:
|
||||
self.event.fire_event({'Minion data cache refresh': load['id']}, tagify(load['id'], 'refresh', 'minion'))
|
||||
return data
|
||||
|
||||
def _minion_event(self, load):
|
||||
|
|
Loading…
Add table
Reference in a new issue