Merge pull request #42748 from whiteinge/save-before-output

Workaround Orchestrate problem that highstate outputter mutates data
This commit is contained in:
Mike Place 2017-08-07 16:11:32 -05:00 committed by GitHub
commit 61fad97286

View file

@ -408,8 +408,6 @@ class SyncClientMixin(object):
)
data['success'] = False
namespaced_event.fire_event(data, 'ret')
if self.store_job:
try:
salt.utils.job.store_job(
@ -427,6 +425,9 @@ class SyncClientMixin(object):
log.error('Could not store job cache info. '
'Job details for this run may be unavailable.')
# Outputters _can_ mutate data so write to the job cache first!
namespaced_event.fire_event(data, 'ret')
# if we fired an event, make sure to delete the event object.
# This will ensure that we call destroy, which will do the 0MQ linger
log.info('Runner completed: {0}'.format(data['jid']))