Fix multihost sync deadlock on mixed-architecture combinations#47
Open
prikryla wants to merge 2 commits into
Open
Fix multihost sync deadlock on mixed-architecture combinations#47prikryla wants to merge 2 commits into
prikryla wants to merge 2 commits into
Conversation
The sync library's sync-get service (ncat -l) only listens on IPv4. When get_IP() resolved a hostname to an IPv6 address, sync-block tried to connect via IPv6, the connection silently failed every round, and the multihost test deadlocked until the 2-hour duration limit. Prefer IPv4 in get_IP() via getent ahostsv4, falling back to getent hosts only when no IPv4 address exists. Also filter hostname -I output for MY_IP to avoid picking up an IPv6 address. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts IP address resolution in the multihost clevis boot unlock test to prefer IPv4 addresses and avoid IPv6-only resolutions that cause sync deadlocks, by updating get_IP() and MY_IP detection logic. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
get_IP(), the fallbackgetent hostspath can still return an IPv6 address and reintroduce the deadlock behavior; consider filtering that output for IPv4 (e.g.,awk '$1 ~ /^[0-9]+\./ { print $1; exit }') or failing fast when no IPv4 is available so the caller can handle it explicitly. - When deriving
MY_IPfromhostname -I, if no IPv4 address is present the new pipeline will leaveMY_IPempty; you may want an explicit fallback or error path for that case to avoid confusing failures later in the test.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `get_IP()`, the fallback `getent hosts` path can still return an IPv6 address and reintroduce the deadlock behavior; consider filtering that output for IPv4 (e.g., `awk '$1 ~ /^[0-9]+\./ { print $1; exit }'`) or failing fast when no IPv4 is available so the caller can handle it explicitly.
- When deriving `MY_IP` from `hostname -I`, if no IPv4 address is present the new pipeline will leave `MY_IP` empty; you may want an explicit fallback or error path for that case to avoid confusing failures later in the test.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
- Filter getent hosts fallback with awk to only return IPv4 addresses, preventing the fallback path from reintroducing IPv6 deadlocks - Add explicit rlFail when MY_IP has no IPv4 address instead of silently leaving it empty - Clarify error message for CLEVIS_IP/TANG_IP resolution failure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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 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.
The sync library's sync-get service (ncat -l) only listens on IPv4. When get_IP() resolved a hostname to an IPv6 address, sync-block tried to connect via IPv6, the connection silently failed every round, and the multihost test deadlocked until the 2-hour duration limit.
Prefer IPv4 in get_IP() via getent ahostsv4, falling back to getent hosts only when no IPv4 address exists. Also filter hostname -I output for MY_IP to avoid picking up an IPv6 address.
Summary by Sourcery
Ensure multihost clevis boot unlock tests consistently use IPv4 addresses to avoid sync deadlocks on hosts with IPv6.
Bug Fixes: