Merge pull request #11779 from cachedout/11453-1

Fix #11453
This commit is contained in:
Thomas S Hatch 2014-04-04 15:15:22 -06:00
commit b9ec87cb7b
2 changed files with 9 additions and 0 deletions

View File

@ -1196,6 +1196,12 @@ class AESFuncs(object):
return False return False
if not salt.utils.verify.valid_id(self.opts, load['id']): if not salt.utils.verify.valid_id(self.opts, load['id']):
return False return False
mods = set()
for func in self.mminion.functions.values():
mods.add(func.__module__)
for mod in mods:
sys.modules[mod].__grains__ = load['grains']
pillar = salt.pillar.Pillar( pillar = salt.pillar.Pillar(
self.opts, self.opts,
load['grains'], load['grains'],
@ -1215,6 +1221,8 @@ class AESFuncs(object):
{'grains': load['grains'], {'grains': load['grains'],
'pillar': data}) 'pillar': data})
) )
for mod in mods:
sys.modules[mod].__grains__ = self.opts['grains']
return data return data
def _minion_event(self, load): def _minion_event(self, load):

View File

@ -7,6 +7,7 @@ Render the pillar data
import os import os
import collections import collections
import logging import logging
import copy
# Import salt libs # Import salt libs
import salt.loader import salt.loader