Skip to content

Don't fork in try with critical finally logic. - #31512

Merged
cachedout merged 1 commit into
saltstack:developfrom
DSRCorporation:issues/29567_do_not_fork_in_try
Feb 26, 2016
Merged

cachedout merged 1 commit into
saltstack:developfrom
DSRCorporation:issues/29567_do_not_fork_in_try

Conversation

@DmitryKuzmenko

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes multimaster minion hanging (or long waiting) on failover when master disappears at runtime.
The problem appear because fork call was moved inside a try section in the scheduler code. This made the final section to be executed twice additionally before the actual scheduled logic.

What issues does this PR fix or reference?

Fixes: #29567, #30643, #30181.
Fixes a mistake in 5a1b2ca.
Complements #30796: they both should be applied together to fix the mentioned issues.
Affects versions: 2015.8.[4-7], 2016.3

Previous Behavior

Minion stops to handle minion events on failover to the second master so it doesn't connect.

New Behavior

Minion properly failover to the next master.

Tests written?

  • Yes
  • No

Fork executes finally section triple times.
@cachedout

Copy link
Copy Markdown
Contributor

Nice one, @DmitryKuzmenko . Great job.

@rallytime

Copy link
Copy Markdown
Contributor

This was back-ported to 2015.8 with #31525, and merged forward to 2016.3 with #31560.

@DmitryKuzmenko
DmitryKuzmenko deleted the issues/29567_do_not_fork_in_try branch August 15, 2016 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

multi master failover successful but execute command ‘salt * test.ping’ on second master return ‘Minion did not return. [No response]’

3 participants