Skip to content

Conversation

@spargaon
Copy link
Collaborator

@spargaon spargaon commented Dec 3, 2025

Identify boot mode of the system using an existing dbus service. Boot mode for Single Node [2P-Default] is 0 and it is 1 for Multi-Node [2x1P].

Check the URL for resource bios_active and parameter HostNumber. If the boot mode is Multi-Node [2x1P] and HostNumber is 0, return an error.
0 is not a valid parameter HostNumber value for the resource bios_active on Multi-Node [2x1P] systems.

Tested:
Verified on Multi-Node [2x1P] and Single Node [2P-Default] systems.

@spargaon
Copy link
Collaborator Author

spargaon commented Dec 3, 2025

bootmodehostnumberbiosactive.txt

Tested on Morocco, kenya, and congo

@spargaon
Copy link
Collaborator Author

spargaon commented Dec 3, 2025

Issue async dbus service get property request early enough for it to complete such that we have boot mode available before any URL requests for the resource bios_active with parameter HostNumber can be issued.
The boot mode property value does not after BMC boots unless specifically changed. If and when the boot mode property value is changed, BMC reboots and the dbus service fetches the new value.
In bmcweb, we can not having blocking calls to a dbus service, so issue an async call with a callback to populate
boot mode property value.

@spargaon
Copy link
Collaborator Author

spargaon commented Dec 5, 2025

Since we know the dbus service and the property, object mapper services need not be availed but getProperty will not work since the query can not block for the response to arrive.

@spargaon
Copy link
Collaborator Author

spargaon commented Dec 7, 2025

Return error (message) for missing, incorrect, or invalid HostNumber parameter value.
rferrors.txt

@spargaon
Copy link
Collaborator Author

spargaon commented Dec 7, 2025

Changed to use getProperty but we still can not use dbus::utility:: for getProperty as current version does not support
getProperty and using dbus::utility::getAllProperties<uint16_t> would complicate code for no gain.

Multi Node [2x1P]
root@morocco-0075:# uptime
18:00:17 up 0 min, load average: 2.67, 0.71, 0.24
root@morocco-0075:
# journalctl -u bmcweb -f
Dec 07 17:59:52 morocco-0075 systemd[1]: Started Start bmcweb server.
Dec 07 17:59:58 morocco-0075 bmcweb[275]: [ERROR log_services.hpp:1701] Entred: requestRoutesEventLogEntriesPost
Dec 07 17:59:58 morocco-0075 bmcweb[275]: [ERROR bootmode.hpp:28] getBootMode bmode 1

Single Node [2P-Default]

root@morocco-0075:# uptime
18:19:19 up 1 min, load average: 1.45, 0.56, 0.20
root@morocco-0075:
# journalctl -u bmcweb -f
Dec 07 18:18:03 morocco-0075 systemd[1]: Started Start bmcweb server.
Dec 07 18:18:09 morocco-0075 bmcweb[274]: [ERROR log_services.hpp:1701] Entred: requestRoutesEventLogEntriesPost
Dec 07 18:18:09 morocco-0075 bmcweb[274]: [ERROR bootmode.hpp:28] getBootMode bmode 0

@spargaon
Copy link
Collaborator Author

spargaon commented Dec 8, 2025

Refactored the code to eliminate a once time service and send a dbus service call as needed.

asyncfunction.txt

@spargaon
Copy link
Collaborator Author

spargaon commented Dec 8, 2025

Should check boot mode only if the host number is 0

getproperty.txt

@spargaon spargaon requested a review from ojayanth December 8, 2025 21:10
return;
}
BMCWEB_LOG_DEBUG("boot mode: {}", bmode);
processUpdateServiceFirmwareInventoryGet(hostNumber, asyncResp, param);
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this line - processUpdateServiceFirmwareInventoryGet we already making call down

Identify boot mode of the system using an existing dbus service.
Boot mode for Single Node [2P-Default] is 0 and it is
1 for Multi-Node [2x1P].

Check the URL for resource bios_active and parameter HostNumber.
If the boot mode is Multi-Node [2x1P] and HostNumber is 0,
return an error.
0 is not a valid parameter HostNumber value for the resource
bios_active on Multi-Node [2x1P] systems.

Tested:
Verified on Multi-Node [2x1P] and Single Node [2P-Default] systems.

Signed-off-by: Shirish Pargaonkar <Shirish.Pargaonkar@amd.com>
@spargaon
Copy link
Collaborator Author

@srgovard @supven01 @ojayanth @aasboddu
any additional review comments?

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.

4 participants