Skip to content

Conversation

@dmurphy18
Copy link
Contributor

What does this PR do?

Allows for failed in data when handling batch mode responses from client, see

salt/salt/client/__init__.py

Lines 1362 to 1374 in f65f953

if expect_minions:
for minion in list(minions - found):
yield {minion: {"failed": True}}
# Filter out any minions marked as missing for which we received
# returns (prevents false events sent due to higher-level masters not
# knowing about lower-level minions).
missing -= found
# Report on missing minions
if missing:
for minion in missing:
yield {minion: {"failed": True}}

What issues does this PR fix or reference?

Fixes: #60724

Previous Behavior

In a large environment with 1000s for minions connected to a Master, some commands where causing tracebacks due to key 'ret' not found in data dictionary when processing response to jobs sent.

New Behavior

Now checks for '{"failed": True}' being returned when processing responses to jobs sent in batch mode.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@dmurphy18 dmurphy18 requested a review from a team as a code owner February 25, 2022 22:56
@dmurphy18 dmurphy18 requested review from a team, s0undt3ch and twangboy and removed request for a team February 25, 2022 22:56
@MKLeb
Copy link
Contributor

MKLeb commented Mar 1, 2022

Figured I'd review since I've been in this code recently.

@Ch3LL Ch3LL added the Phosphorus v3005.0 Release code name and version label Mar 2, 2022
@garethgreenaway garethgreenaway merged commit db44ebc into saltstack:master Mar 2, 2022
@dmurphy18 dmurphy18 deleted the exception_error_bug_60724 branch May 3, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Phosphorus v3005.0 Release code name and version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] key error in python leading to "An un-handled exception was caught by salt's global exception handler"

5 participants