Fix minion startup failure on Windows when ipv6: true is set#69178
Open
twangboy wants to merge 3 commits into
Open
Fix minion startup failure on Windows when ipv6: true is set#69178twangboy wants to merge 3 commits into
twangboy wants to merge 3 commits into
Conversation
Three IPC socket paths in the TCP transport hardcoded AF_INET / 127.0.0.1 regardless of the ipv6 option. On Windows, binding or connecting an AF_INET6 socket to an IPv4 address (or vice-versa) is rejected by the OS, causing the minion to fail to start with gaierror(11001). - Add _ipc_loopback(opts) helper to salt.transport.base; update ipc_publish_server() and ipc_publish_client() to pass ::1 instead of 127.0.0.1 when ipv6: true is set - Fix TCPPuller.start() to select AF_INET6 when the host contains ':' - Fix _TCPPubServerPublisher._connect() with the same family detection Add unit tests for all three fixes. Update the ipv6 option documentation in master.rst, minion.rst, and the default config files to explain the IPC loopback address behaviour. (fixes saltstack#66603)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Three IPC socket paths in the TCP transport hardcoded AF_INET / 127.0.0.1 regardless of the ipv6 option. On Windows, binding or connecting an AF_INET6 socket to an IPv4 address (or vice-versa) is rejected by the OS, causing the minion to fail to start with gaierror(11001).
Add unit tests for all three fixes. Update the ipv6 option documentation
in master.rst, minion.rst, and the default config files to explain the
IPC loopback address behaviour.
What issues does this PR fix or reference?
Fixes #66603
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes