mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Correct issue with ping on rotate with minion cache (#33765)
Only check connected minions if we have the data to do so. Closes #29525
This commit is contained in:
parent
378dd7ca06
commit
b3ec39d644
1 changed files with 7 additions and 2 deletions
|
@ -668,8 +668,13 @@ class ConnectedCache(multiprocessing.Process):
|
|||
|
||||
def ping_all_connected_minions(opts):
|
||||
client = salt.client.LocalClient()
|
||||
ckminions = salt.utils.minions.CkMinions(opts)
|
||||
client.cmd(list(ckminions.connected_ids()), 'test.ping', expr_form='list')
|
||||
if opts['minion_data_cache']:
|
||||
tgt = list(salt.utils.minions.CkMinions(opts).connected_ids())
|
||||
form = 'list'
|
||||
else:
|
||||
tgt = '*'
|
||||
form = 'glob'
|
||||
client.cmd(tgt, 'test.ping', expr_form=form)
|
||||
|
||||
# test code for the ConCache class
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Reference in a new issue