You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: accept Redfish interface id on machine_setup via BootInterfaceRef
This closesNVIDIA/infra-controller#2169.
Enhances the `boot_interface_mac: Option<&str>` parameter on `machine_setup`, `machine_setup_status`, and `is_bios_setup` with a new `boot_interface: Option<BootInterfaceRef>`, which is an enum whose variants are `Mac` (existing behavior) and `InterfaceId`.
The problem we're running into is when we flip a DPU from DPU mode to NIC mode, we run into this state where the `NetworkDeviceFunction` becomes `Disabled` (because it's now in NIC mode), and since the interface changed, it gets wiped as a boot device (and boot device goes back to `Disabled` with the default integraed NIC).
..AND when we go to `machine_setup` with the known MAC, that fails, because as part of switching from DPU mode to NIC mode (and the device function being reported as `Disabled`, it appears the vendor hardware doesn't re-probe the interface, so it doesn't populate a MAC address, so `machine_setup` fails, because there's no matching MAC address across all of these):
* `Chassis/.../NetworkDeviceFunctions/<id>.Ethernet.MACAddress`
* `Systems/.../EthernetInterfaces/<id>.MACAddress`
* `Chassis/.../NetworkAdapters/<adapter>/NetworkPorts/<id>` fields
However, if we just directly set the boot interface back to the previously set boot interface from before the flip, it forces a re-probe that interface partition ID, the MAC re-populates, and it UEFI HTTP boots.
I had tried flipping the NDF back to `Enabled`, but it looks like some BMCs ALSO lock the `Enable` knob: `NetworkDeviceFunction.NetDevFuncCapabilities` is published as `["Disabled"]`, so the `NetDevFuncType` field literally can't be PATCHed away from `Disabled` via the NDF Settings URL. The only mechanism that actually activates a Disabled partition is to PATCH the vendor's HTTP-boot binding BIOS attribute to the partition's id and reboot — BIOS at POST then enables the underlying PCI function as a side effect, and the BMC re-inventories the MAC. That side-effect path is exactly what `machine_setup` already does; the only obstacle was that it derived the id from a MAC the BMC had wiped. By accepting an `InterfaceId` directly, callers that captured the id earlier (typically site-explorer during initial discovery, before the partition went Disabled) skip the broken lookup.
So, this adds support to just let us specify the interface ID directly, and not need to pass a MAC to do a MAC -> interface ID lookup.
This will have a corresponding change on the NICo side as well as part of pulling it in.
Signed-off-by: Chet Nichols III <chetn@nvidia.com>
0 commit comments