feat: wire oem_manager_profiles config through to machine_setup (nvbugs-5834644)#533
feat: wire oem_manager_profiles config through to machine_setup (nvbugs-5834644)#533martinraumann wants to merge 5 commits intoNVIDIA:mainfrom
Conversation
🛡️ Vulnerability Scan🚨 Found 72 vulnerability(ies) Severity Breakdown:
🔗 View full details in Security tab 🕐 Last updated: 2026-03-16 15:53:27 UTC | Commit: c7f446b |
78ddba5 to
6e38623
Compare
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-03-11 23:45:10 UTC | Commit: 78ddba5 |
kensimon
left a comment
There was a problem hiding this comment.
Just a minor readability nit, otherwise LGTM.
…utes
Extends machine_setup to accept oem_manager_profiles, a new config-driven
map (same structure as bios_profiles) for vendor/model-keyed Dell iDRAC
manager attributes.
In libredfish (v0.43.2 / f08c5e79), machine_setup gains a fourth parameter
oem_manager_profiles: &BiosProfileVendor. For Dell, matching attributes are
merged into the machine_setup_oem PATCH payload targeting
Managers/{id}/Oem/Dell/DellAttributes/{id}. All other vendors accept the
parameter as a no-op. disable_psu_hot_spare() is removed from the trait.
carbide-core changes:
- CarbideConfig gains oem_manager_profiles field (TOML-deserializable,
same type as bios_profiles)
- state_controller passes oem_manager_profiles to machine_setup at all
call sites
- mock machine_setup updated to match new signature
- admin-cli and site_explorer pass empty map (no OEM profiles needed there)
To enable the Dell R760 PSU Hot Spare fix, add to site config:
[oem_manager_profiles.Dell.PowerEdge_R760.performance]
ServerPwr.1.PSRapidOn = "Disabled"
Fixes: nvbugs-5834644
Signed-off-by: M Raumann <mraumann@nvidia.com>
3b64aa8 to
3ef1d25
Compare
| /// Used for vendor-specific pre-ingestion fixes that must run before BMC lockdown. | ||
| /// Example: Dell R760 PSU Hot Spare disable (ServerPwr.1.PSRapidOn = Disabled). | ||
| #[serde(default)] | ||
| pub oem_manager_profiles: libredfish::BiosProfileVendor, |
There was a problem hiding this comment.
I feel like the doc should say that this is a hashmap so that people know what to put in the config file. better yet, maybe an example of what goes in the config file
There was a problem hiding this comment.
only because you'd need to look at the redfish crate to know
There was a problem hiding this comment.
hopefully I'm just behind the times. are we using this for all production sites (that want the fix anyway). or is there a corresponding change in the forged repo?
Description
Wires the new `oem_manager_profiles` config parameter (introduced in libredfish v0.43.3) through carbide-core's config system and state controller, enabling site operators to apply vendor-specific BMC manager attributes during `machine_setup` via TOML config — without code changes.
The motivating use case is the Dell R760 PSU Hot Spare fan issue (nvbugs-5834644): the `ServerPwr.1.PSRapidOn` iDRAC attribute must be set to `Disabled` before BMC lockdown to prevent unnecessary fan spin-up. This PR provides the mechanism and enables the fix globally by default in `carbide-api-config.toml`.
Note: libredfish v0.43.3 was already bumped in #466. This PR builds on top of that.
Changes
Design
`oem_manager_profiles` uses the same `BiosProfileVendor` type as the existing `bios_profiles` field — a vendor-keyed nested map. It is vendor-neutral: libredfish routes entries to the correct OEM manager endpoint per vendor (e.g. `Managers/{id}/Oem/Dell/DellAttributes/{id}` for Dell). Full design notes: nvbugs-5834644-oem-profiles-design.md
Type of Change
Testing
New test: `test_oem_manager_profiles_passed_to_machine_setup` — constructs a Dell R760 OEM profile map, puts it in `CarbideConfig`, calls `call_machine_setup_and_handle_no_dpu_error`, and asserts the mock received the correct map. Guards against future regressions where the argument is dropped or replaced with an empty map.
Additional Notes
The R760 entry in `carbide-api-config.toml` is keyed by model name as returned by the Redfish `/Systems/{id}` `Model` field (spaces replaced with underscores via `model_coerce`). Sites without R760 hosts are unaffected — an empty/non-matching map produces no PATCH body changes.