Skip to content

test(machine-a-tron): guard the empty-NDF-MAC Dell boot NIC through HostInit#2896

Closed
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-2821
Closed

test(machine-a-tron): guard the empty-NDF-MAC Dell boot NIC through HostInit#2896
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-2821

Conversation

@chet

@chet chet commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

libredfish v0.44.16 makes a Dell host whose boot NIC reports an empty NetworkDeviceFunction MAC -- a NicMode-stripped or iDRAC partition, where the EthernetInterface MAC stays populated -- resolve the boot NIC by its interface id instead of by the absent MAC, so it clears HostInit/PollingBiosSetup instead of looping there forever.

This bumps the pin to bring that in and adds an end-to-end machine-a-tron regression test so the path stays covered. The host still resolves a Pair (MAC + the interface id captured at exploration), so is_bios_setup's MAC lookup fails and falls back to the id -- reaching Ready proves it no longer hangs.

Changes

Testing

test_integration locally, both directions:

  • v0.44.16 (this PR): passes -- the empty-NDF-MAC host reaches Ready.
  • v0.44.15 (pre-fix): the same host times out in PollingBiosSetup -- confirming the guard catches the regression.

This supports #2821

…ostInit

libredfish v0.44.16 makes a Dell host whose boot NIC reports an empty
NetworkDeviceFunction MAC -- a NicMode-stripped or iDRAC partition, where the
EthernetInterface MAC stays populated -- resolve the boot NIC by its interface
id instead of by the absent MAC, so it clears HostInit/PollingBiosSetup instead
of looping there. This bumps the pin to bring that in and adds an end-to-end
machine-a-tron test so the path stays covered.

The host still resolves a Pair (MAC + the interface id captured at exploration),
so PollingBiosSetup's is_bios_setup MAC lookup fails and falls back to the id --
reaching Ready proves the host no longer hangs.

- Bump libredfish v0.44.15 -> v0.44.16 (the Dell BIOS-verify by-interface-id fix).
- Add a per-host bmc-mock empty_ndf_mac knob: serves an empty boot-NIC
  NetworkDeviceFunction MAC while the EthernetInterface MAC stays populated
  (honored by Dell, the one model with a NetworkDeviceFunction).
- Add a machine-a-tron test driving such a Dell host to Ready; pre-fix it
  strands in PollingBiosSetup.

Tests added!

This supports NVIDIA#2821

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet
chet requested a review from a team as a code owner June 25, 2026 19:00
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a223f4b6-e8f2-4ecc-a555-b38d96ddd11c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The PR adds an empty_ndf_mac flag from machine configuration into the Dell R750 mock, where the boot NIC’s NetworkDeviceFunction can emit an empty MAC. The machine-a-tron integration suite adds a dedicated empty-MAC scenario and updates existing harness calls.

Changes

Empty NDF MAC support

Layer / File(s) Summary
Config plumbing
Cargo.toml, crates/machine-a-tron/src/config.rs, crates/bmc-mock/src/machine_info.rs, crates/machine-a-tron/src/host_machine.rs
Adds empty_ndf_mac to machine config and host state, copies it through persisted and new host construction, wires it into the Dell mock config, and updates the workspace libredfish dependency tag.
Dell mock MAC handling
crates/bmc-mock/src/hw/dell_poweredge_r750.rs
The Dell PowerEdge R750 mock now uses empty_ndf_mac to emit either an empty NetworkDeviceFunction.MACAddress or the NIC MAC.
Integration harness and scenario coverage
crates/api-integration-tests/tests/lib.rs
The machine-a-tron harness accepts the new flag, existing integration cases pass false, and a new test covers the empty-NDF-MAC ready-state path with true.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds the regression test and mock knob, but it does not show the verify-path code changes requested in #96. Implement the BootInterfaceRef verify-path changes in is_bios_setup, diff_bios_bmc_attr, machine_setup_status, and shared helper reuse, or retarget the issue scope.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the empty-NDF-MAC Dell boot-NIC regression guard, which matches the main change.
Description check ✅ Passed The description matches the changeset and accurately explains the libredfish bump, mock knob, and regression test.
Out of Scope Changes check ✅ Passed The dependency bump, mock flag, and regression test are all tied to the Dell empty-NDF-MAC fix; no unrelated changes stand out.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@chet

chet commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai PTAL, thanks!

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@chet I'll review the changes now.

🐇

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@poroh poroh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt that adding one-off flag to machine info is right approach. Putting "request change" to discuss it before merge.

@github-actions

Copy link
Copy Markdown

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
boot-artifacts-aarch64 3 0 0 3 0 0
boot-artifacts-x86_64 3 0 0 3 0 0
forge-admin-cli-x86_64 283 6 24 98 7 148
machine-validation-runner 744 32 188 267 36 221
machine_validation 744 32 188 267 36 221
machine_validation-aarch64 744 32 188 267 36 221
nvmetal-carbide 744 32 188 267 36 221
TOTAL 3265 134 776 1172 151 1032

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

@chet chet closed this Jun 26, 2026
@chet

chet commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2931.

The fix itself shipped in libredfish v0.44.16 (NVIDIA/libredfish#96, with a nw_dev_func_matches unit test) and is in NICo via #2889 — so #2821 is fixed and guarded at the layer where the bug lived.

This PR was an attempt to add an end-to-end machine-a-tron guard. Per the review steer, I reworked it from a bmc-mock flag to the failure-injection feature (including a new MergeEachMember action), but the e2e couldn't reproduce the hang deterministically. is_bios_setup reads the boot NIC's NetworkDeviceFunction via the $expand'd collection, so: a member-endpoint rule never reached it; a collection rule corrupted the bare $refs that exploration parses (Members[0]: missing Id); and even past that, the host still reached Ready on the pre-fix build — i.e. the test wasn't actually catching the regression. An object-level mock would have bitten, but that's the flag approach we were moving away from.

Rather than land a vacuous e2e, the deterministic coverage now lives in #2931 — tests for retained_boot_interfaces, the store that keeps the boot-interface id available so the controller can always fall back to it (the mechanism that keeps #2821-class hosts resolvable). Combined with the libredfish unit test and QA on the XE9680, #2821 is covered.

The MergeEachMember injection action prototyped here was clean and unit-tested — happy to revisit it if a future test needs runtime field-injection into an expanded collection.

@chet
chet deleted the gh-issue-2821 branch June 27, 2026 06:32
nv-dmendoza pushed a commit that referenced this pull request Jul 23, 2026
…ingestion (#4012)

> [!IMPORTANT]
> This PR cherry-picks the host boot-interface configuration convergence
arc into `release/v2.0`, in merge order:
> - #3139 (`78aa3766a`) -- skip the SetBootOrder re-apply when the boot
config is already set
> - #3186 (`064ce21bc`) -- apply SetBootOrder boot config once per
reboot
> - #3194 (`428135d4f`) -- resolve the boot NIC through one shared step
> - #3369 (`a2ab63f2c`) -- ensure a correct boot config during machine
validation
> - #3454 (`9d80c7fcd`) -- generalized convergence for host boot
interface configuration

## Related issues

This supports #2821
(nvbug 6430706).

## Type of Change

- [ ] **Add** - New feature or capability
- [ ] **Change** - Changes in existing functionality
- [x] **Fix** - Bug fixes
- [ ] **Remove** - Removed features or deprecated functionality
- [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.)

## Breaking Changes

- [ ] **This PR contains breaking changes**

## Testing

- [x] Unit tests added/updated
- [x] Integration tests added/updated
- [ ] Manual testing performed
- [ ] No testing required (docs, internal refactor, etc.)

## Additional Notes

Backports the boot-interface convergence follow-ups that a v2.0 NIC-mode
host needs to clear `PollingBiosSetup`/`BiosSetupFailed` (nvbug 6430706
/ #2821). The base fix -- #2950, re-assert the HTTP boot device during
NIC-mode -- is already in `release/v2.0`; this arc is the refinement set
that lands the boot config by interface ID when the Dell NDF MAC goes
empty, and converges it across host init, assigned setup, DPU
reprovision, and validation.

- **One conflict, in #3454** (`crates/machine-controller/Cargo.toml`
`[dev-dependencies]`): resolved to `carbide-redfish` +
`carbide-test-harness` + `carbide-test-support`, dropping
`carbide-instrument` -- that crate does not exist on `release/v2.0` and
nothing in the picked code references it. All other commits applied
cleanly.
- **libredfish:** no bump needed. The interface-ID boot resolution
requires libredfish >= v0.44.16; `release/v2.0` already pins
**v0.44.21** (`main` is at v0.44.22).
- **#2896 intentionally excluded:** it was closed unmerged (a libredfish
pin bump + test), superseded by #2950, which is already in v2.0.

---------

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
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