Repository navigation
Add loopback fallback when local IP discovery finds no candidates - #9926
Merged
Merged
Conversation
Use family-specific loopback when automatic local address discovery returns no candidates and no interface is explicitly configured, preventing client startup failures on macOS CI runners. Preserve existing failure behavior when an explicit interface name is configured. Add ConfigTests coverage for IPv4 fallback, IPv6 fallback, and explicit-interface exceptions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds loopback fallback functionality to Orleans' local IP address discovery, improving robustness when running in containerized or restricted network environments. When no network interface candidates are discovered and no explicit interface name is configured, the system now gracefully falls back to IPv4 or IPv6 loopback addresses instead of failing with an exception.
Changes:
- Extracted IP address resolution logic into a new testable
ResolveLocalIPAddressmethod inConfigUtilities - Added loopback fallback for IPv4 (
IPAddress.Loopback) and IPv6 (IPAddress.IPv6Loopback) when no candidates are found and no explicit interface is configured - Preserved existing exception behavior when
NetworkInterfaceNameis explicitly set but no matching interface is found - Added comprehensive unit tests covering IPv4 fallback, IPv6 fallback, and explicit interface failure scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Orleans.Core/Configuration/ConfigUtilities.cs | Refactored GetLocalIPAddress to delegate to new ResolveLocalIPAddress method; added loopback fallback logic for IPv4/IPv6 address families when no candidates exist and no explicit interface is configured |
| test/NonSilo.Tests/ConfigTests.cs | Added three unit tests verifying IPv4 loopback fallback, IPv6 loopback fallback, and exception throwing for explicit interface configuration with no candidates |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Feb 16, 2026
rkargMsft
pushed a commit
to rkargMsft/orleans
that referenced
this pull request
Feb 27, 2026
…tnet#9926) Add loopback fallback for local IP discovery Use family-specific loopback when automatic local address discovery returns no candidates and no interface is explicitly configured, preventing client startup failures on macOS CI runners. Preserve existing failure behavior when an explicit interface name is configured. Add ConfigTests coverage for IPv4 fallback, IPv6 fallback, and explicit-interface exceptions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
ConfigUtilitiesNetworkInterfaceNameis explicitly setNonSilo.Testsfor IPv4 fallback, IPv6 fallback, and explicit-interface failureTesting
dotnet test test\NonSilo.Tests\NonSilo.Tests.csproj --filter "FullyQualifiedName~Config_LocalIPAddressFallback" -v minimal --nologodotnet test test\TesterInternal\TesterInternal.csproj --filter "FullyQualifiedName~DisabledCallChainReentrancyTests.NonReentrantGrain" -v minimal --nologoMicrosoft Reviewers: Open in CodeFlow