fix: add networkd fallback for netplan static IP probe#7565
Merged
Obihoernchen merged 1 commit intoMay 7, 2026
Conversation
Detect static netplan addresses on older Ubuntu netplan releases by falling back to generated systemd-networkd configuration when netplan get is unavailable. Keep netplan get authoritative when supported. Co-authored-by: karcaw <663031+karcaw@users.noreply.github.com>
Obihoernchen
approved these changes
May 7, 2026
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.
This follows up on the netplan static-IP probe work by handling older Ubuntu netplan releases where netplan get is not available.
xcatprobe xcatmnnow keeps the currentnetplan getpath when it works. Ifnetplan getis unavailable, it falls back to generatedsystemd-networkd.network files and only reports a static IP when both of these match:DHCP-enabled networkd configs are rejected, and stderr from unsupported netplan get commands is suppressed to avoid noisy probe output.
Credits to @karcaw for the original netplan detection patch in #7227.
Validation:
It should work for Ubuntu 18.04 down to Ubuntu 14.04 without issues.
Fixes #7227
Refs #7226