Skip to content

fix: add networkd fallback for netplan static IP probe#7565

Merged
Obihoernchen merged 1 commit into
xcat2:masterfrom
VersatusHPC:fix/netplan-static-ip-fallback
May 7, 2026
Merged

fix: add networkd fallback for netplan static IP probe#7565
Obihoernchen merged 1 commit into
xcat2:masterfrom
VersatusHPC:fix/netplan-static-ip-fallback

Conversation

@viniciusferrao
Copy link
Copy Markdown
Member

@viniciusferrao viniciusferrao commented May 7, 2026

This follows up on the netplan static-IP probe work by handling older Ubuntu netplan releases where netplan get is not available.

xcatprobe xcatmn now keeps the current netplan get path when it works. If netplan get is unavailable, it falls back to generated systemd-networkd .network files and only reports a static IP when both of these match:

  • [Match] Name= matches the probed interface
  • [Network] Address= matches the probed IP

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:

  • Ubuntu 20.04 container: netplan generate plus generated networkd fallback passed
  • Ubuntu 22.04 container: netplan get path passed
  • Ubuntu 24.04 container: netplan get path passed
  • Ubuntu 26.04 container: netplan get path passed

It should work for Ubuntu 18.04 down to Ubuntu 14.04 without issues.

Fixes #7227
Refs #7226

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 Obihoernchen added this to the 2.18 milestone May 7, 2026
@Obihoernchen Obihoernchen merged commit 96b0b0b into xcat2:master May 7, 2026
2 checks passed
@viniciusferrao viniciusferrao deleted the fix/netplan-static-ip-fallback branch May 7, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants