diff --git a/salt/utils/event.py b/salt/utils/event.py index d13c7a92ea..fe4e8e0627 100644 --- a/salt/utils/event.py +++ b/salt/utils/event.py @@ -307,19 +307,30 @@ class SaltEvent(object): self.fire_event( data, '{0}.{1}'.format(tags[0], tags[-1])) # old dup event + data['jid'] = load['jid'] + data['id'] = load['id'] + data['success'] = false + data['return'] = 'Error: {0}.{1}'.format(tags[0], tags[-1]) + data['fun'] = load['fun'] self.fire_event( data, tagify([load['jid'], - 'ret', + 'sub', load['id'], - 'error', - tags[0], - tags[-1]], - 'job')) + 'error', + load['fun']], + 'job')) except Exception: pass else: - self.fire_event(load, load['fun']) + self.fire_event(load, load['fun']) # old dup event + self.fire_event(load, + tagify([load['jid'], + 'sub', + load['id'], + 'ret', + load['fun']], + 'job')) def __del__(self): self.destroy()