Skip to content

Commit

Permalink
Correct issue with ping on rotate with minion cache (#33765)
Browse files Browse the repository at this point in the history
Only check connected minions if we have the data to do so. Closes #29525
  • Loading branch information
Mike Place authored and Nicole Thomas committed Jun 10, 2016
1 parent 378dd7c commit b3ec39d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions salt/utils/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,13 @@ def run(self):

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__':
Expand Down

0 comments on commit b3ec39d

Please sign in to comment.