From 511541f7f059ad8f8234ebf9053487b89baf86c5 Mon Sep 17 00:00:00 2001 From: zzhiyuan Date: Wed, 27 Jan 2021 08:31:32 -0800 Subject: [PATCH] [Arista] Use thermalctld instead of fancontrol (#6173) **- Why I did it** There is a preference to use thermalctld instead of fancontrol for 201911 release branch. The Arista platform submodule updates and thermal policies in the platforms will allow Arista devices to use thermalctld instead of fancontrol. **- How I did it** I cherry-picked the necessary commits from master branch for sonic-platform-modules-arista into 201911 branch. I've also added the file to skip fancontrol and added the thermal policies json. **- How to verify it** On Gardena, Upperlake, Clearlake, and Lodoga thermalctld is up and running with no errors. Fans show ~29%. Co-authored-by: Zhi Yuan Carl Zhao --- .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 2 +- .../thermal_policy.json | 1 + .../pmon_daemon_control.json | 4 ++ .../x86_64-arista_common/thermal_policy.json | 60 +++++++++++++++++++ .../barefoot/sonic-platform-modules-arista | 2 +- .../broadcom/sonic-platform-modules-arista | 2 +- 26 files changed, 88 insertions(+), 13 deletions(-) create mode 120000 device/arista/x86_64-arista_7050_qx32/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7050_qx32s/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7050cx3_32s/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7060_cx32s/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7060cx2_32s/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7060px4_32/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7170_32c/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7170_32cd/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7170_64c/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7260cx3_64/thermal_policy.json create mode 120000 device/arista/x86_64-arista_7280cr3_32p4/thermal_policy.json create mode 100644 device/arista/x86_64-arista_common/pmon_daemon_control.json create mode 100644 device/arista/x86_64-arista_common/thermal_policy.json diff --git a/device/arista/x86_64-arista_7050_qx32/pmon_daemon_control.json b/device/arista/x86_64-arista_7050_qx32/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7050_qx32/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7050_qx32/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7050_qx32/thermal_policy.json b/device/arista/x86_64-arista_7050_qx32/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7050_qx32s/pmon_daemon_control.json b/device/arista/x86_64-arista_7050_qx32s/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7050_qx32s/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7050_qx32s/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7050_qx32s/thermal_policy.json b/device/arista/x86_64-arista_7050_qx32s/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7050_qx32s/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7050cx3_32s/pmon_daemon_control.json b/device/arista/x86_64-arista_7050cx3_32s/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7050cx3_32s/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7050cx3_32s/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7050cx3_32s/thermal_policy.json b/device/arista/x86_64-arista_7050cx3_32s/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7050cx3_32s/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060_cx32s/pmon_daemon_control.json b/device/arista/x86_64-arista_7060_cx32s/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7060_cx32s/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7060_cx32s/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060_cx32s/thermal_policy.json b/device/arista/x86_64-arista_7060_cx32s/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7060_cx32s/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060cx2_32s/pmon_daemon_control.json b/device/arista/x86_64-arista_7060cx2_32s/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7060cx2_32s/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7060cx2_32s/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060cx2_32s/thermal_policy.json b/device/arista/x86_64-arista_7060cx2_32s/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7060cx2_32s/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060px4_32/pmon_daemon_control.json b/device/arista/x86_64-arista_7060px4_32/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7060px4_32/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7060px4_32/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7060px4_32/thermal_policy.json b/device/arista/x86_64-arista_7060px4_32/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7060px4_32/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7170_32c/pmon_daemon_control.json b/device/arista/x86_64-arista_7170_32c/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7170_32c/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7170_32c/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7170_32c/thermal_policy.json b/device/arista/x86_64-arista_7170_32c/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7170_32c/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7170_32cd/pmon_daemon_control.json b/device/arista/x86_64-arista_7170_32cd/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7170_32cd/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7170_32cd/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7170_32cd/thermal_policy.json b/device/arista/x86_64-arista_7170_32cd/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7170_32cd/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7170_64c/pmon_daemon_control.json b/device/arista/x86_64-arista_7170_64c/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7170_64c/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7170_64c/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7170_64c/thermal_policy.json b/device/arista/x86_64-arista_7170_64c/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7170_64c/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7260cx3_64/pmon_daemon_control.json b/device/arista/x86_64-arista_7260cx3_64/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7260cx3_64/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7260cx3_64/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7260cx3_64/thermal_policy.json b/device/arista/x86_64-arista_7260cx3_64/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7260cx3_64/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7280cr3_32p4/pmon_daemon_control.json b/device/arista/x86_64-arista_7280cr3_32p4/pmon_daemon_control.json index 2322ef7a22..51d5ab7b00 120000 --- a/device/arista/x86_64-arista_7280cr3_32p4/pmon_daemon_control.json +++ b/device/arista/x86_64-arista_7280cr3_32p4/pmon_daemon_control.json @@ -1 +1 @@ -../x86_64-arista_common/pmon_daemon_control_skip_thermalctld.json \ No newline at end of file +../x86_64-arista_common/pmon_daemon_control.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_7280cr3_32p4/thermal_policy.json b/device/arista/x86_64-arista_7280cr3_32p4/thermal_policy.json new file mode 120000 index 0000000000..0991dc7f36 --- /dev/null +++ b/device/arista/x86_64-arista_7280cr3_32p4/thermal_policy.json @@ -0,0 +1 @@ +../x86_64-arista_common/thermal_policy.json \ No newline at end of file diff --git a/device/arista/x86_64-arista_common/pmon_daemon_control.json b/device/arista/x86_64-arista_common/pmon_daemon_control.json new file mode 100644 index 0000000000..6453cd2c5d --- /dev/null +++ b/device/arista/x86_64-arista_common/pmon_daemon_control.json @@ -0,0 +1,4 @@ +{ + "skip_fancontrol": true +} + diff --git a/device/arista/x86_64-arista_common/thermal_policy.json b/device/arista/x86_64-arista_common/thermal_policy.json new file mode 100644 index 0000000000..ca1f01e7be --- /dev/null +++ b/device/arista/x86_64-arista_common/thermal_policy.json @@ -0,0 +1,60 @@ +{ + "thermal_control_algorithm": { + "run_at_boot_up": "true", + "fan_speed_when_suspend": "100" + }, + "info_types": [ + { + "type": "control_info" + }, + { + "type": "fan_info" + }, + { + "type": "thermal_info" + } + ], + "policies": [ + { + "name": "any thermal critical", + "conditions": [ + { + "type": "thermal.any.critical" + } + ], + "actions": [ + { + "type": "fan.all.set_speed", + "speed": "100" + } + ] + }, + { + "name": "any thermal overheat", + "conditions": [ + { + "type": "thermal.any.overheat" + } + ], + "actions": [ + { + "type": "fan.all.set_speed", + "speed": "100" + } + ] + }, + { + "name": "normal operations", + "conditions": [ + { + "type": "normal" + } + ], + "actions": [ + { + "type": "thermal_control.control" + } + ] + } + ] +} diff --git a/platform/barefoot/sonic-platform-modules-arista b/platform/barefoot/sonic-platform-modules-arista index 74684eea4b..79b7d11b61 160000 --- a/platform/barefoot/sonic-platform-modules-arista +++ b/platform/barefoot/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit 74684eea4b2b1af97685d926e6ad183450122668 +Subproject commit 79b7d11b61c5eec2b4a38a6414417b7b4f064aab diff --git a/platform/broadcom/sonic-platform-modules-arista b/platform/broadcom/sonic-platform-modules-arista index 74684eea4b..79b7d11b61 160000 --- a/platform/broadcom/sonic-platform-modules-arista +++ b/platform/broadcom/sonic-platform-modules-arista @@ -1 +1 @@ -Subproject commit 74684eea4b2b1af97685d926e6ad183450122668 +Subproject commit 79b7d11b61c5eec2b4a38a6414417b7b4f064aab