v0.96.0 — R-50 island NIC: provision attaches the guest island net1
- LocalAPIConfig.island_bridge + island_guest_addr (+ IslandEnabled, Validate all-or-nothing + CIDR guard) - buildBringUpConfig attaches static net1 (island) on provision + DR when set; absent otherwise (pre-R-50 byte-for-byte). Plumbed from cfg.LocalAPI at both RunBringUp sites. Endpoint already follows listen_addr (A0: no template change). - healer stays eth0-only (A3 verify-only) — red-proof test locks the scoping - example config + firewall example rewritten for the island; REUSE updated - 3 non-hollow tests; full green. MinAgent unchanged. Coupling: host-install island config requires agent >= 0.96.0 (vouch first).
This commit is contained in:
@@ -548,3 +548,21 @@ func TestClassify_Table(t *testing.T) {
|
||||
}
|
||||
|
||||
var _ io.Writer = (*bytes.Buffer)(nil)
|
||||
|
||||
// A3 (R-50): the guestnet healer is eth0-only and MUST stay blind to the island NIC. A guest on an
|
||||
// island host presents eth0 DHCP (the LAN leg the healer owns) PLUS eth1 static (the island). Because
|
||||
// parseMode is interface-scoped, adding eth1 static cannot flip eth0's detected mode — so the healer
|
||||
// keeps treating eth0 as DHCP and never runs dhclient against the static island NIC (which would
|
||||
// sabotage it). This is the verify-only guarantee that let R-50 ship the island NIC without a healer
|
||||
// change. Red-proof: make parseMode scan globally instead of per-dev and the eth0 assertion fails.
|
||||
func TestParseMode_IslandStaticNICDoesNotConfuseEth0(t *testing.T) {
|
||||
interfaces := "auto lo\niface lo inet loopback\n\n" +
|
||||
"auto eth0\niface eth0 inet dhcp\n\n" +
|
||||
"auto eth1\niface eth1 inet static\n address 169.254.253.2/30\n"
|
||||
if got := parseMode(interfaces, "eth0"); got != ModeDHCP {
|
||||
t.Errorf("eth0 must classify DHCP even with an island eth1 static present, got %q", got)
|
||||
}
|
||||
if got := parseMode(interfaces, "eth1"); got != ModeStatic {
|
||||
t.Errorf("eth1 (island) must classify static when asked directly (dev-scoped), got %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user