sonic-buildimage/platform/mellanox/mlnx-platform-api/sonic_platform
Kebo Liu 7873a9131d
[Mellanox] Skip the leftover hardware reboot cause in case of last boot is warm/fast reboot (#13246)
- Why I did it
In case of warm/fast reboot, the hardware reboot cause will NOT be cleared because CPLD will not be touched in this flow. To not confuse the reboot cause determine logic, the leftover hardware reboot cause shall be skipped by the platform API, platform API will return the 'REBOOT_CAUSE_NON_HARDWARE' instead of the "hardware" reboot cause.

- How I did it
Check the proc cmdline to see whether the last reboot is a warm or fast reboot, if yes skip checking the leftover hardware reboot cause.

- How to verify it
a. Manual test:
    - Perform a power loss
    - Perform a warm/fast reboot
    - Check the reboot cause should be "warm-reboot" or "fast-reboot" instead of "power loss"
b. Run reboot cause related regression test.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2023-01-11 16:50:46 +02:00
..
__init__.py [Mellanox] Add NVIDIA Copyright header to "mellanox" files (#8799) 2021-10-17 19:03:02 +03:00
chassis.py [Mellanox] Skip the leftover hardware reboot cause in case of last boot is warm/fast reboot (#13246) 2023-01-11 16:50:46 +02:00
component.py Remove \n from the end of fs_path in ONIEUpdater (#12465) 2022-10-23 09:59:20 +03:00
cpu_thermal_control.py [Mellanox] Add CPU thermal control for Nvidia platforms (#10202) 2022-03-21 09:54:52 -07:00
device_data.py [Mellanox] Add new thermal sensors for SN5600 (#12671) 2022-11-14 11:10:33 -08:00
eeprom.py [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
fan_drawer.py [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
fan.py [device/mellanox] Mitigation for security vulnerability (#11877) 2022-10-06 17:51:31 -04:00
led.py [Mellanox] Allow user to set LED to orange (#9259) 2021-12-08 13:05:10 -08:00
module.py [Mellanox] Remove TODO comments which are no longer needed (#13023) 2022-12-14 09:57:48 +02:00
pcie.py [Mellanox] Add NVIDIA Copyright header to "mellanox" files (#8799) 2021-10-17 19:03:02 +03:00
platform.py [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
psu.py [Mellanox] Remove TODO comments which are no longer needed (#13023) 2022-12-14 09:57:48 +02:00
sfp_event.py [Mellanox] Enhance Platform API to support SN2201 - RJ45 ports and new components mgmt. (#10377) 2022-06-20 19:12:20 -07:00
sfp.py [SFP] Change logging severity when failed to read EEPROM (#13011) 2022-12-20 10:05:45 +02:00
thermal_actions.py [Mellanox] Update NVIDIA License header for files changed since 1.1.2022 (#10289) 2022-03-23 13:19:25 +02:00
thermal_conditions.py [Mellanox] Update NVIDIA License header for files changed since 1.1.2022 (#10289) 2022-03-23 13:19:25 +02:00
thermal_infos.py [Mellanox] Fan speed should not be 100% when PSU is powered off (#9258) 2021-11-24 14:56:00 +02:00
thermal_manager.py [Mellanox] Add CPU thermal control for Nvidia platforms (#10202) 2022-03-21 09:54:52 -07:00
thermal.py [Mellanox] Add new thermal sensors for SN5600 (#12671) 2022-11-14 11:10:33 -08:00
utils.py [Mellanox] change the implementation of is_host() to fix a stuck issue on simx platform (#13100) 2022-12-20 10:00:11 +02:00
vpd_parser.py [Mellanox] Auto correct PSU voltage threshold (WA) (#10394) 2022-04-14 08:14:40 +03:00
watchdog.py [Mellanox] Add NVIDIA Copyright header to "mellanox" files (#8799) 2021-10-17 19:03:02 +03:00