Repository navigation
NAS-144884 / 28.0.0-BETA.1 / truenas-appliance-runner: spare-nics adds NICs with nothing on the other end, for interface changes - #27
Conversation
…her end, for interface changes
| NICs besides the one the API is reached on, 0 to 9, each alone on a | ||
| qemu hub: no DHCP, no route, nothing on the other end. For a suite to | ||
| apply interface changes on without cutting itself off. Their MACs, | ||
| 52:54:00:e2:e0:01 and up, are in TN_SPARE_NICS. Not for an HA pair. |
There was a problem hiding this comment.
LOW: The MACs only show up in TN_SPARE_NICS when export-env is 'true'. start prints the line, but the only thing that passes it on is grep '^TN_' >> "$GITHUB_ENV", and there's no action output for it the way ssh has one. A caller with export-env: 'false' and spare-nics: 1 gets the NIC but no way to read its MAC. This is the same as TN_DOMAIN and the other TN_* values that have no output, so it isn't a defect. The description could say it depends on export-env, or the action could add a spare-nics output.
|
One finding: one LOW. No human review needed. LOW: What I checked:
CI: |
|
This PR has been merged and conversations have been locked. |
Why
The appliance has one NIC, the one the suite reaches its API on, so the E2E
suite cannot apply an interface change.
interface.commitre-applies everyinterface, and a VLAN, bridge or LAGG built on the only NIC could take away the
suite's only path to the appliance. truenas/webui#14537 (commit a VLAN, a bridge
and a LAGG with Test Changes and Save Changes, then delete them) is on hold for
that reason.
Change
spare-nics, 0 to 9, default0. Nothing changes for existingcallers, nor for github-truenas-runner's image build, which fetches these
scripts.
(
-netdev hubport,hubid=N+-device virtio-net-pci). Its link is up, andthere is no DHCP, no route and no peer. That is why this is not a second
-nic user,restrict=on: user-mode networking always runs a DHCP server, andmiddleware starts DHCP on every physical NIC while its interfaces table is
empty. TrueNAS's dhcpcd has
noipv4ll, so the NIC should not get a 169.254address either.
and its interface name whatever the count.
52:54:00:e2:e0:01and up, exported space-separated asTN_SPARE_NICS. The suite matchesinterface.query'sstate.link_addressinstead of guessing which NIC has no address.
ha: truewithspare-nicsset fails with an error, asextra-disk-gbdoes, instead of
ha.shsilently ignoring it.…, 10 data disks of 10G, 1 spare NIC), and theREADME's input table and
appliance.sh's header list the setting.qemu warns
hub N is not connected to host networkonce per spare NIC at boot.That is expected, and the comment beside the arguments says so.
Testing
shellcheck -x appliance.sh ha.sh lib.shandactionlintare clean, andnode scripts/check-input-refs.jsreports that all input references resolve.-nic userand two spare NICsbuilt as
startbuilds them.info networkshows each spare on its own hubwith its fixed MAC, and the user-mode NIC unchanged.
info pciputs themanagement NIC at device 2 and the spares at 3 and 4.
spare-nics: 1is that test. Its boot line should read…, 1 spare NIC, andinterface.queryshould show a NIC with MAC52:54:00:e2:e0:01and no IPv4address.