Skip to content

Commit fbab0af

Browse files
authored
fix: query both the vendor and OEM fields at the redfish base root to determine a BMC's vendor (#2761)
<!-- Describe what this PR does --> fix: some supermicros do not report the vendor at the raw vendor field at the base redfish root. instead, they report the vendor as SMC at the OEM field. use the vendor() func to determine the vendor from the BMC as it checks both the raw vendor and oem fields as a fallback. fixes: 6338388 ## Related issues <!-- Refer to existing GitHub issues here --> ## Type of Change <!-- Check one that best describes this PR --> - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [ ] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Breaking Changes <!-- If checked, describe the breaking changes and migration steps --> <!-- Breaking changes are not generally permitted, please discuss on a GitHub discussion or with the development team if you believe you need to break a backward compatibility guarantee --> - [ ] **This PR contains breaking changes** ## Testing <!-- How was this tested? Check all that apply --> - [ ] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [ ] No testing required (docs, internal refactor, etc.) ## Additional Notes <!-- Any additional context, deployment notes, or reviewer guidance -->
1 parent fecf5d2 commit fbab0af

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

crates/site-explorer/src/redfish.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,18 @@ impl RedfishClient {
130130

131131
let service_root = client.get_service_root().await.map_err(map_redfish_error)?;
132132

133-
if service_root.vendor.is_none() {
134-
return Err(EndpointExplorationError::MissingVendor);
133+
// Do not gate on the raw `Vendor` field: some BMCs (e.g. Supermicro
134+
// SYS-121H-TNR) leave ServiceRoot.Vendor null but still identify
135+
// themselves via the `Oem` key. libredfish's `vendor()` already
136+
// consults Oem as a fallback, so resolve through it and only reject
137+
// when the result is genuinely unrecognized. See NVBug 6338388.
138+
match service_root.vendor() {
139+
Some(vendor) if vendor != RedfishVendor::Unknown => Ok(vendor),
140+
_ => {
141+
tracing::info!("No recognized vendor for BMC at {bmc_ip_address}");
142+
Err(EndpointExplorationError::MissingVendor)
143+
}
135144
}
136-
137-
let Some(vendor) = service_root.vendor() else {
138-
tracing::info!("No vendor found for BMC at {bmc_ip_address}");
139-
return Err(EndpointExplorationError::MissingVendor);
140-
};
141-
142-
Ok(vendor)
143145
}
144146

145147
pub async fn validate_bmc_credentials(

0 commit comments

Comments
 (0)