New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2017.7] event send multi master #48588

Merged
merged 3 commits into from Jul 17, 2018

Conversation

Projects
None yet
4 participants
@garethgreenaway
Member

garethgreenaway commented Jul 13, 2018

What does this PR do?

When using Salt multi-master, if we encounter a salt master that has not accepted the minion key yet we should not exit right away, rather continue on and try the next salt master available in the list. If the channel.send is successful, ensure that ret is True in case previous attempts at contacting masters had set it to False.

What issues does this PR fix or reference?

#48415

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.

garethgreenaway added some commits Jul 13, 2018

When using Salt multi-master, if we encouter a salt master that has n…
…ot accepted the minion key yet we should not exit right away, rather continue on and try the next salt master available in the list.
If the channel send is sucessful and does not raise an exception, we …
…set ret to True, in case a previous exception from a previous channel send to another master has sent it to False.

@garethgreenaway garethgreenaway requested a review from cachedout Jul 13, 2018

@garethgreenaway garethgreenaway changed the title from 48415 event send multi master to [2017.7] event send multi master Jul 13, 2018

@garethgreenaway garethgreenaway requested a review from rallytime Jul 14, 2018

@rallytime

This is nice.

sys.exit(2)
# We have a list of masters, so we should break
# and try the next one in the list.
if self.opts.get('local_masters', None):

This comment has been minimized.

@cachedout

cachedout Jul 16, 2018

Contributor

This is nit-picky but this is such a sensitive area that I would feel better if we checked explicitly against a list type.

This comment has been minimized.

@garethgreenaway

garethgreenaway Jul 16, 2018

Member

@cachedout I can go that route but local_masters is only there if the masters configuration item is a list.

This comment has been minimized.

@cachedout

cachedout Jul 16, 2018

Contributor

Oh! Oh! My fault. You're totally right.

@rallytime rallytime merged commit 1b6e638 into saltstack:2017.7 Jul 17, 2018

9 of 16 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
default Build finished.
Details
jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #6465 — FAILURE
Details
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #20518 — FAILURE
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has failed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has failed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has failed
Details
WIP ready for review
Details
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #26681 — SUCCESS
Details
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #18710 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #24393 — SUCCESS
Details
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #11435 — SUCCESS
Details
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #23347 — SUCCESS
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
@mattp-

This comment has been minimized.

Contributor

mattp- commented Aug 22, 2018

gtmanfred added a commit that referenced this pull request Aug 22, 2018

Merge pull request #49262 from bloomberg/short-circuit
extend #48588 to cover SyncAuth class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment