Merge pull request #47471 from meaksh/2017.7-fix-inconsistent-scheduled-jid-with-returners

Fix inconsistency with "jid" on minion scheduled jobs and the returners output
This commit is contained in:
Nicole Thomas 2018-05-09 14:20:00 -04:00 committed by GitHub
commit d3121fcfa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -941,11 +941,13 @@ class Schedule(object):
else:
# Send back to master so the job is included in the job list
mret = ret.copy()
mret['jid'] = 'req'
if data.get('return_job') == 'nocache':
# overwrite 'req' to signal to master that
# this job shouldn't be stored
mret['jid'] = 'nocache'
# No returners defined, so we're only sending back to the master
if not data_returner and not self.schedule_returner:
mret['jid'] = 'req'
if data.get('return_job') == 'nocache':
# overwrite 'req' to signal to master that
# this job shouldn't be stored
mret['jid'] = 'nocache'
load = {'cmd': '_return', 'id': self.opts['id']}
for key, value in six.iteritems(mret):
load[key] = value