#
bdc18bd4 |
| 08-Jun-2025 |
Jayanth Othayoth <ojayanth@gmail.com> |
clang-tidy: Fix unused variable warnings
- Removed unused const variable 'IBMCFFPSInterface' in validator.cpp. - Suppressed unused private field warning for 'systemBus' in cold_redundancy.hpp. -
clang-tidy: Fix unused variable warnings
- Removed unused const variable 'IBMCFFPSInterface' in validator.cpp. - Suppressed unused private field warning for 'systemBus' in cold_redundancy.hpp. -
Below error fixed:
''' ./tools/power-utils/validator.cpp:14:12: error: unused variable 'IBMCFFPSInterface' [-Werror,-Wunused-const-variable] 14 | const auto IBMCFFPSInterface =
/cold-redundancy/cold_redundancy.hpp:67:51: error: private field 'systemBus' is not used [-Werror,-Wunused-private-field] 67 | std::shared_ptr<sdbusplus::asio::connection>& systemBus;
power-sequencer/mihawk-cpld.hpp:109:23: error: private field 'bus' is not used [clang-diagnostic-unused-private-field] 109 | sdbusplus::bus_t& bus;
'''
Change-Id: Ic194a58b646d469ff78fb5147290784fe4ed9480 Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
show more ...
|
#
fe5b5c66 |
| 22-Mar-2025 |
Faisal Awada <faisal@us.ibm.com> |
psutil: Add PSU update validation logic
This commit adds the PSUUpdateValidator class implementation which validates whether it is safe to proceed with a PSU firmware update based on current system
psutil: Add PSU update validation logic
This commit adds the PSUUpdateValidator class implementation which validates whether it is safe to proceed with a PSU firmware update based on current system state. It verifies the following:
- All present PSUs match the model of the target PSU - Count the number of present PSUs in the system - Ensure that the number of PSUs currently present, none faulty and all of the same model, is sufficient to meet the PSU requirement specified in the system configuration
This validator fetches PSU inventory paths, properties such as 'SupportedModel' and 'RedundantCount', and checks the PSU presence and not faulty via D-Bus.
The method `validToUpdate()` encapsulates the overall logic, returning true if all criteria for a safe update are met.
This class is designed to be integrated before triggering PSU updates to ensure system safety.
Tested: - Ran psutils with --validate on powered-on system, verified update blocked - Ran psutils with simulated PSUs of mismatched models, verified update blocked - Ran with matching models and sufficient present PSUs, verified update succeeded
Change-Id: I367ef6d1b2cd66e8209f6b67a325de2b1a6da12a Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|