Fix misleading arping error message when bond interface is not ready #503
+49
−13
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.
Problem
When running
ifup
on a bond interface while bond negotiation is incomplete, the arping command fails to send packets and outputsSent 0 probes (0 broadcast(s)) Received 0 response(s)
. However, the error message incorrectly suggests an IP address conflict:This is misleading because:
()
where a MAC address should be looks like a bugRoot Cause
The existing code only checks if a MAC address is found in the arping output to detect duplicate IPs. When arping fails because the interface cannot send packets (bond negotiation incomplete), no MAC is extracted, but the code doesn't distinguish this case from other failures.
Solution
Enhanced the arping error handling logic to detect when the interface is not ready by checking for the
Sent 0 probes
pattern in arping output. The code now distinguishes between three failure scenarios:Changes
network-scripts/ifup-eth
Added detection inside the arping retry loop:
After retries exhausted, provide specific error:
network-scripts/ifup-aliases
Applied similar improvements for alias interface handling, with proper MAC detection before reporting duplicate IP errors.
po/initscripts.pot
Regenerated translation template to include the new error message string.
Error Message Comparison
Before:
After:
Configuration Guidance
Users experiencing this issue can now adjust these options in their ifcfg files:
Benefits
Testing
Validated three scenarios:
Fixes the issue reported in #XXX where @lnykryn suggested improving error messages based on arping output to better distinguish between different failure modes.
Original prompt
Fixes #465
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.