Why I did it SONiC service determine-reboot-cause might run before driver creating reset cause files. In that case, the reset cause will be "Unknown". This PR introduces a wait mechanism to wait for reset cause sysfs files ready. How I did it /run/hw-management/config/reset_attr_ready is the file to indicate all reset cause files are ready. In chassis.get_reboot_cause function, it waits /run/hw-management/config/reset_attr_ready for up to 45 seconds. How to verify it Manual test on master/202211/202205 |
||
---|---|---|
.. | ||
__init__.py | ||
chassis.py | ||
component.py | ||
cpu_thermal_control.py | ||
device_data.py | ||
eeprom.py | ||
fan_drawer.py | ||
fan.py | ||
led.py | ||
module.py | ||
pcie.py | ||
platform.py | ||
psu.py | ||
sfp_event.py | ||
sfp.py | ||
thermal_actions.py | ||
thermal_conditions.py | ||
thermal_infos.py | ||
thermal_manager.py | ||
thermal.py | ||
utils.py | ||
vpd_parser.py | ||
watchdog.py |