Don't overwrite the minion_ids var that was passed

The minion_ids var that was passed into the function was being
overwritten by a list of ALL the minion ids found in the minion cache

Fixes: #38003

ZD1187
This commit is contained in:
David Boucha 2017-02-02 11:38:01 -07:00
parent 75da6f461b
commit f833bf3a79

View file

@ -109,7 +109,6 @@ class MasterPillarUtil(object):
log.debug('Skipping cached mine data minion_data_cache'
'and enfore_mine_cache are both disabled.')
return mine_data
minion_ids = self.cache.list('minions')
for minion_id in minion_ids:
if not salt.utils.verify.valid_id(self.opts, minion_id):
continue
@ -127,7 +126,6 @@ class MasterPillarUtil(object):
log.debug('Skipping cached data because minion_data_cache is not '
'enabled.')
return grains, pillars
minion_ids = self.cache.list('minions')
for minion_id in minion_ids:
if not salt.utils.verify.valid_id(self.opts, minion_id):
continue