Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
salt.14270
checking-for-jid-before-returning-data.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File checking-for-jid-before-returning-data.patch of Package salt.14270
From 8ced9cdeb53e7dc20a1665ba2e373fbdc5d30c5d Mon Sep 17 00:00:00 2001 From: Jochen Breuer <jbreuer@suse.de> Date: Tue, 9 Apr 2019 16:32:46 +0200 Subject: [PATCH] Checking for jid before returning data Seems raw can have returns for the same minion, but an other job. In order to not return resutls from the wrong job, we need to check for the jid. --- salt/client/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/salt/client/__init__.py b/salt/client/__init__.py index 8b37422cbf..aff354a021 100644 --- a/salt/client/__init__.py +++ b/salt/client/__init__.py @@ -1560,8 +1560,12 @@ class LocalClient(object): if 'minions' in raw.get('data', {}): continue try: - found.add(raw['id']) - ret = {raw['id']: {'ret': raw['return']}} + # There might be two jobs for the same minion, so we have to check for the jid + if jid == raw['jid']: + found.add(raw['id']) + ret = {raw['id']: {'ret': raw['return']}} + else: + continue except KeyError: # Ignore other erroneous messages continue -- 2.22.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor