Limit servers to IPv4 to make them work with WSL (only for WSL environments) #5956
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.
Summary
Builds on the work by @stickeegreg in #5912 and responds to the comment from @ChristopherHX to making the default network stack for the artifact and cache services
tcp4if running in WSL. Also added the option to configure via CLI flags.Changes
WSL_DISTRO_NAMEis set: Usestcp4(IPv4-only) when launching the artifact & cache services to avoid EHOSTUNREACH/ECONNREFUSED errors (see ECONNREFUSED to artifact service on WSL2 with mirrored networking #2636 & Cache server EHOSTUNREACH #1866)tcp(dual-stack IPv4/IPv6) as before.--artifact-server-networkand--cache-server-networkCLI flags with validation for valid stack values (tcp,tcp4,tcp6)StartHandler()andServe()to accept network parameterUsage
Related Issues
Fixes #2636 - ECONNREFUSED to artifact service on WSL2
Fixes #1866 - Cache server EHOSTUNREACH on WSL2
Based on #5912 - Initial hardcoded fix