Skip to content

Fix missing minion returns in batch mode - #58503

Closed
avgoor wants to merge 2 commits into
saltstack:masterfrom
avgoor:fix-batch-mode
Closed

avgoor wants to merge 2 commits into
saltstack:masterfrom
avgoor:fix-batch-mode

Conversation

@avgoor

@avgoor avgoor commented Sep 19, 2020

Copy link
Copy Markdown

Don't close pub if there are pending events, otherwise events will be lost
resulting in empty minion returns.

What does this PR do?

It fixes a bug in the batch client that randomly looses minion returns

What issues does this PR fix or reference?

Fixes: #58502

Don't close pub if there are pending events, otherwise events will be lost
resulting in empty minion returns.
@avgoor
avgoor requested a review from a team as a code owner September 19, 2020 16:43
@avgoor
avgoor requested review from Akm0d and removed request for a team September 19, 2020 16:43
@welcome

welcome Bot commented Sep 19, 2020

Copy link
Copy Markdown

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected] or reach out directly to the Community Manager, Cassandra Faris via Slack. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@ghost
ghost requested a review from garethgreenaway September 19, 2020 16:43
@dwoz dwoz added needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases has-failing-test labels Sep 22, 2020
@sagetherage
sagetherage removed the request for review from Akm0d March 5, 2021 23:55
@Oloremo

Oloremo commented Dec 23, 2021

Copy link
Copy Markdown
Contributor

I wonder if it could help with the #61079 as well. I wonder if the failhard is enabled in your case.

@Ch3LL Ch3LL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require changelog and possibly tests. But I want to get some other reviews here first before determining if this will require a test. @dwoz and @s0undt3ch can you review here and what are your opinions on test coverage on this change?

@Ch3LL
Ch3LL requested review from dwoz and s0undt3ch March 3, 2022 21:21
Comment thread salt/client/__init__.py
self._clean_up_subscriptions(pub_data["jid"])
finally:
if not was_listening:
if not was_listening and not self.event.pending_events:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not happy with leaving the event bus unclosed. We've had memory leaks because of that.
Waiting until there are no pending events won't work?

@dwoz dwoz self-assigned this Dec 10, 2023
@dwoz dwoz added this to the Argon v3008.0 milestone Dec 18, 2023
@dwoz

dwoz commented Jul 5, 2024

Copy link
Copy Markdown
Contributor

This can be re-based and re-opened if it should get into 3008.x. It would be a great fix to have.

@dwoz dwoz closed this Jul 5, 2024
agraul pushed a commit to agraul/salt that referenced this pull request Jan 27, 2025
Don't close pub if there are pending events, otherwise events will be lost
resulting in empty minion returns.

Co-authored-by: Denis V. Meltsaykin <[email protected]>

BACKPORT-UPSTREAM=saltstack#58503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-failing-test needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Minion returns randomly missing in batch mode

5 participants