mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
parent
6df52780eb
commit
a4c524176f
@ -140,6 +140,14 @@
|
||||
# 'aes_key_rotate' event with the 'key' tag and acting appropriately.
|
||||
# ping_on_rotate: False
|
||||
|
||||
# By default, the master deletes its cache of minion data when the key for that
|
||||
# minion is removed. To preserve the cache after key deletion, set
|
||||
# 'preserve_minion_cache' to True.
|
||||
#
|
||||
# WARNING: This may have security implications if compromised minions auth with
|
||||
# a previous deleted minion ID.
|
||||
#preserve_minion_cache: False
|
||||
|
||||
# If max_minions is used in large installations, the master might experience
|
||||
# high-load situations because of having to check the number of connected
|
||||
# minions for every authentication. This cache provides the minion-ids of
|
||||
|
@ -186,6 +186,7 @@ VALID_OPTS = {
|
||||
'pillar_source_merging_strategy': str,
|
||||
'ping_on_key_rotate': bool,
|
||||
'peer': dict,
|
||||
'preserve_minion_cache': bool,
|
||||
'syndic_master': str,
|
||||
'runner_dirs': list,
|
||||
'client_acl': dict,
|
||||
@ -474,6 +475,7 @@ DEFAULT_MASTER_OPTS = {
|
||||
'pillar_source_merging_strategy': 'smart',
|
||||
'ping_on_key_rotate': False,
|
||||
'peer': {},
|
||||
'preserve_minion_cache': False,
|
||||
'syndic_master': '',
|
||||
'runner_dirs': [],
|
||||
'outputter_dirs': [],
|
||||
|
@ -485,9 +485,10 @@ class Key(object):
|
||||
minions = []
|
||||
for key, val in keys.items():
|
||||
minions.extend(val)
|
||||
for minion in os.listdir(m_cache):
|
||||
if minion not in minions:
|
||||
shutil.rmtree(os.path.join(m_cache, minion))
|
||||
if self.opts.get('preserve_minion_cache', False):
|
||||
for minion in os.listdir(m_cache):
|
||||
if minion not in minions:
|
||||
shutil.rmtree(os.path.join(m_cache, minion))
|
||||
|
||||
def check_master(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user