generate a jid for cache_jobs on the minion

If the load is passed back to the master with a jid of 'req', the master does a
'prep_jid' and uses that jid to store the data.  The minion would just save it
to the cache as 'req'.

This will at least generate the jid for the minions cache.
This commit is contained in:
Daniel Wallace 2018-01-29 11:05:58 -07:00
parent 395d6f5c91
commit 280767ed57
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48

View file

@ -1761,7 +1761,9 @@ class Minion(MinionBase):
load['out'] = oput
if self.opts['cache_jobs']:
# Local job cache has been enabled
salt.utils.minion.cache_jobs(self.opts, load['jid'], ret)
if ret['jid'] == 'req':
ret['jid'] = salt.utils.jid.gen_jid()
salt.utils.minion.cache_jobs(self.opts, ret['jid'], ret)
if not self.opts['pub_ret']:
return ''