sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
734 stars 1.41k forks source link

[system_health][Dell 9332] test_system_health fails since thermal_policy.json is missing for Dell platforms #8446

Closed tjchadaga closed 3 years ago

tjchadaga commented 3 years ago

Description

thermal_policy.json file is missing for Dell platforms. This is causing test_system_health to fail at test_device_checker

Steps to reproduce the issue:

  1. Execute test_system_health.py::test_device_checker

Describe the results you received:

Test case fails and throws the below error: "mv: cannot stat '/usr/share/sonic/device/x86_64-dellemc_z9332f_d1508-r0/thermal_policy.json': No such file or directory"

E               "cmd": [
E                   "mv", 
E                   "-f", 
E                   "/usr/share/sonic/device/x86_64-dellemc_z9332f_d1508-r0/thermal_policy.json", 
E                   "/usr/share/sonic/device/x86_64-dellemc_z9332f_d1508-r0/thermal_policy.json.bak"
E               ],
E               "stderr": "mv: cannot stat '/usr/share/sonic/device/x86_64-dellemc_z9332f_d1508-r0/thermal_policy.json': No such file or directory", 
E               "stderr_lines": [
E                   "mv: cannot stat '/usr/share/sonic/device/x86_64-dellemc_z9332f_d1508-r0/thermal_policy.json': No such file or directory"

platform_tests/thermal_control_test_helper.py:333: in disable_thermal_policy
    with ThermalPolicyFileContext(duthost, invalid_policy_file):
platform_tests/thermal_control_test_helper.py:304: in __enter__
    self.dut.command('mv -f {} {}'.format(self.thermal_policy_file_path, self.thermal_policy_file_backup_path))
common/devices/multi_asic.py:89: in _run_on_asics
    return getattr(self.sonichost, self.multi_asic_attr)(*module_args, **complex_args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Describe the results you expected:

Test case should pass on all platform with no errors

Output of show version:


SONiC Software Version: SONiC.20201231.15
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-amd64
Build commit: 1798fba1e0
Build date: Tue Aug 10 00:49:38 UTC 2021
Built by: AzDevOps@sonic-int-build-workers-0002JW

Platform: x86_64-dellemc_z9332f_d1508-r0
HwSKU: DellEMC-Z9332f-O32
ASIC: broadcom
ASIC Count: 1
Serial Number: TH04CN21CET0004K0214
Uptime: 22:10:44 up  4:31,  2 users,  load average: 0.93, 0.88, 0.76

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

gechiang commented 3 years ago

@aravindmani-1 please take a look and provide comment.

aravindmani-1 commented 3 years ago

@gechiang , @tjchadaga Thermal control is done by BMC in DellEMC Z9332f platform. There is no need to implement thermal_policy.json for this platform and the test script may have to be changed to ignore the thermal_policy.