Skip to content

Add ensure_beaker_ip_on to fix unapplied static IPs (EL10/vagrant) - #284

Merged
silug merged 1 commit into
masterfrom
el10-network-fix
Jul 3, 2026
Merged

Add ensure_beaker_ip_on to fix unapplied static IPs (EL10/vagrant)#284
silug merged 1 commit into
masterfrom
el10-network-fix

Conversation

@silug

@silug silug commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Problem

Vagrant configures static private-network IPs on RedHat-family guests by writing legacy ifcfg files, which EL10 no longer supports. The interface silently falls back to NetworkManager DHCP with an arbitrary address, so everything that targets the Beaker-recorded host[:ip] (cross-SUT traffic, direct Net::SSH logins, NFS mounts, log forwarding) fails with No route to host.

This is the root cause of the almalinux10 acceptance failures across the open cleanup PRs (rsyslog, simp_snmpd, tlog, autofs, nfs, simp_nfs, simp_gitlab, libreswan).

Fix

New ensure_beaker_ip_on(hosts), run automatically in the global before(:all) alongside activate_interfaces:

  • Skips hosts whose host[:ip] is already assigned (cheap no-op on healthy platforms)
  • Finds the interface attached to the expected network (subnet match against live ip -o -4 addr)
  • Re-applies the expected address via nmcli connection modify ... ipv4.method manual ... ipv4.never-default yes (reboot-safe, matches Vagrant's static-network semantics — no gateway/default-route pollution)
  • Falls back to a runtime-only ip addr add when NetworkManager isn't managing the interface
  • Honors the existing BEAKER_no_fix_interfaces escape hatch

Validation

pupmod-simp-tlog beaker:suites[default,almalinux10] (vagrant_libvirt): 13 examples / 1 failure → 66 examples / 0 failures, with the remediation visible in the log:

-- FIXING: almalinux10 expected IP 10.254.103.152 but 'eth1' has 10.254.12.227

Unit suite: 23 examples, 0 failures; rubocop clean.

Release note for consumption

simp-rake-helpers ~> 5.24 currently pins simp-beaker-helpers ~> 2.0, and module Gemfiles default to '~> 2.0.0' — so module CI cannot consume a 3.x release today. Options: relax the rake-helpers pin, or backport this to a 2.0.6 release (module Gemfiles' ~> 2.0.0 would pick a 2.0.x up automatically).

🤖 Generated with Claude Code

Vagrant configures static private-network IPs on RedHat-family guests by
writing legacy ifcfg files, which EL10 no longer supports. The interface
silently falls back to NetworkManager DHCP with an arbitrary address, so
everything targeting the Beaker-recorded host[:ip] (cross-SUT traffic,
direct Net::SSH logins) fails with 'No route to host'.

Detect the mismatch in the global before(:all) hook (alongside
activate_interfaces) and re-apply the expected address via NetworkManager
(reboot-safe, no default-route pollution), falling back to 'ip addr add'
when NM is not managing the interface. Disable with
BEAKER_no_fix_interfaces.

Validated on pupmod-simp-tlog almalinux10: 13 examples/1 failure ->
66 examples/0 failures.
@op-ct op-ct added this to Org Triage Jul 2, 2026
@silug
silug marked this pull request as draft July 3, 2026 13:21
@silug
silug marked this pull request as ready for review July 3, 2026 13:51
@silug
silug merged commit e8bf908 into master Jul 3, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in Org Triage Jul 3, 2026
@silug
silug deleted the el10-network-fix branch July 3, 2026 14:13
@silug silug removed this from Org Triage Jul 7, 2026
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.

3 participants