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 |
||
---|---|---|
.. | ||
input_platform | ||
__init__.py | ||
conftest.py | ||
duplicate_action.json | ||
duplicate_condition.json | ||
empty_action.json | ||
empty_condition.json | ||
mock_eeprom_data | ||
mock_platform.py | ||
mock_psu_vpd | ||
policy_with_same_conditions.json | ||
test_chassis.py | ||
test_cpu_thermal_control.py | ||
test_eeprom.py | ||
test_fan_api.py | ||
test_firmware.py | ||
test_led.py | ||
test_module.py | ||
test_psu.py | ||
test_sfp_event.py | ||
test_sfp.py | ||
test_thermal_policy.py | ||
test_thermal.py | ||
test_utils.py | ||
test_watchdog.py | ||
thermal_policy.json |