Summary
The TUI applyFields() method in internal/tui/tui.go copies the user-entered interface, address, gateway, and DNS values into cfg.Network, but never sets cfg.Network.Mode = model.NetworkStatic. The mode stays at its zero value (NetworkDHCP).
Steps to Reproduce
- Launch knuckle
- Advance to the Network step
- Fill in Interface, IP Address (CIDR), Gateway, and DNS fields with valid static config
- Press Enter to advance
- Continue to Review step — observe "Network: dhcp"
- Proceed to install — generated Butane YAML has no static network block
Expected
When the user fills in static network fields, cfg.Network.Mode should be set to model.NetworkStatic. The generated Ignition config should contain the 10-static.network systemd unit.
Actual
cfg.Network.Mode remains NetworkDHCP (zero value). The isStatic template function returns false. The static network block is omitted from the Butane output. The user's static IP config is silently ignored.
Root Cause
internal/tui/tui.go lines 141-158: applyFields() for StepNetwork applies individual field values but never sets the network mode:
case model.StepNetwork:
for _, f := range m.fields {
switch f.key {
case "interface":
cfg.Network.Interface = f.value
case "address":
cfg.Network.Address = f.value
// ... but no: cfg.Network.Mode = model.NetworkStatic
Fix
After applying network fields, if cfg.Network.Address is non-empty, set cfg.Network.Mode = model.NetworkStatic. Alternatively, add a DHCP/Static toggle to the UI.
Severity
Critical — This silently produces an incorrect network configuration. A real user configuring a server with a static IP will boot into DHCP instead, potentially making the machine unreachable.
Summary
The TUI
applyFields()method ininternal/tui/tui.gocopies the user-entered interface, address, gateway, and DNS values intocfg.Network, but never setscfg.Network.Mode = model.NetworkStatic. The mode stays at its zero value (NetworkDHCP).Steps to Reproduce
Expected
When the user fills in static network fields,
cfg.Network.Modeshould be set tomodel.NetworkStatic. The generated Ignition config should contain the10-static.networksystemd unit.Actual
cfg.Network.ModeremainsNetworkDHCP(zero value). TheisStatictemplate function returns false. The static network block is omitted from the Butane output. The user's static IP config is silently ignored.Root Cause
internal/tui/tui.golines 141-158:applyFields()forStepNetworkapplies individual field values but never sets the network mode:Fix
After applying network fields, if
cfg.Network.Addressis non-empty, setcfg.Network.Mode = model.NetworkStatic. Alternatively, add a DHCP/Static toggle to the UI.Severity
Critical — This silently produces an incorrect network configuration. A real user configuring a server with a static IP will boot into DHCP instead, potentially making the machine unreachable.