Skip to content

fix: pick the correct manager/system on multi-system, multi-chassis hosts#108

Open
shevchenko-evgeny wants to merge 3 commits into
NVIDIA:mainfrom
shevchenko-evgeny:multi_chassis_fix
Open

fix: pick the correct manager/system on multi-system, multi-chassis hosts#108
shevchenko-evgeny wants to merge 3 commits into
NVIDIA:mainfrom
shevchenko-evgeny:multi_chassis_fix

Conversation

@shevchenko-evgeny

Copy link
Copy Markdown

Match the system by presence of a Bios resource and select the manager whose Links.ManagerForServers references it, instead of blindly taking the first entry.

…osts

Match the system by presence of a Bios resource and select the manager
whose Links.ManagerForServers references it, instead of blindly taking
the first entry. Adds ManagerLinks, get_manager_with_id, is_bios_attributes.

Signed-off-by: Evgeny Shevchenko <eshevchenko@mirantis.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread src/network.rs Outdated
// call set_system_id always before calling set_vendor
s.set_system_id(system_id)?;

// Try to find manager with ManagerForServers related to System

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It might be better to look at the ManagedBy Link on the chosen System to pick the manager instead of traversing all managers for the selected System:

        "ManagedBy": [
            {
                "@odata.id": "/redfish/v1/Managers/BMC_0"
            }
        ],

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

good idea!
implemented that way

Comment thread src/network.rs

//Find another system with BIOS section
let mut system_with_bios = None;
for system_member in &systems {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would be better to use the bios property on the fetched System itself:

for id in &systems {
    let Ok((_, system)) = s
        .client
        .get::<ComputerSystem>(&format!("Systems/{id}"))
        .await
    else {
        break; // Use the existing fallback.
    };
    if system.bios.is_some() {
        system_id = id;
        break;
    }
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done

- model: add `bios: Option<ODataId>` to ComputerSystem so BIOS presence can
  be read straight off the system resource.
- standard: replace is_bios_attributes() (a separate Systems/{id}/Bios GET +
  404 check) with if_system_has_bios(), which fetches the ComputerSystem once
  and returns it when it carries a Bios link.
- network: pick the BIOS-bearing system, take manager_id from its
  Links.ManagedBy[0] (falling back to the first manager), and drop the
  per-manager get_manager_with_id scan.

Signed-off-by: Evgeny Shevchenko <eshevchenko@mirantis.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.

2 participants