-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[3006.x] Minions check dns when re-connecting to a master #66422
Conversation
Adding tests to validate we check for changing dns anytime we're disconnected from the currently connected master
Check for a chainging dns record anytime a minion gets disconnected from it's master. See github issue saltstack#63654 saltstack#61482.
Update docs to use master_alive_interval to detect master ip changes via DNS.
try: | ||
master, self.pub_channel = yield self.eval_master( | ||
opts=self.opts, | ||
failed=True, | ||
failback=tag.startswith(master_event(type="failback")), | ||
) | ||
except SaltClientError: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try: | |
master, self.pub_channel = yield self.eval_master( | |
opts=self.opts, | |
failed=True, | |
failback=tag.startswith(master_event(type="failback")), | |
) | |
except SaltClientError: | |
pass | |
with contextlib.suppress(SaltClientError): | |
master, self.pub_channel = yield self.eval_master( | |
opts=self.opts, | |
failed=True, | |
failback=tag.startswith(master_event(type="failback")), | |
) |
https://docs.python.org/3/library/contextlib.html#contextlib.suppress
Although, not a blocker for merging the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Pedro change request for contextlib usage
What does this PR do?
Make sure minions will check for a changed IP via DNS when the
master_alive_interval
check has failed.What issues does this PR fix or reference?
Fixes: #63654
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.