From 22584504de188e92af58c6354822e463f978c6cd Mon Sep 17 00:00:00 2001 From: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com> Date: Tue, 22 Feb 2022 18:27:41 -0800 Subject: [PATCH 1/6] Update container_checker for multi-asic devices Update container_checker for multi-asic devices to add database containers in always_running_containers. Previous change was made for single-asic, and that database containers were not considered as feature when writing to state_db. --- files/image_config/monit/container_checker | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/files/image_config/monit/container_checker b/files/image_config/monit/container_checker index 2a000d1e6bb7..7411cd581a12 100755 --- a/files/image_config/monit/container_checker +++ b/files/image_config/monit/container_checker @@ -41,9 +41,9 @@ def get_expected_running_containers(): expected_running_containers = set() always_running_containers = set() - + for container_name in feature_table.keys(): - if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: if multi_asic.is_multi_asic(): if feature_table[container_name]["has_global_scope"] == "True": expected_running_containers.add(container_name) @@ -51,14 +51,20 @@ def get_expected_running_containers(): num_asics = multi_asic.get_num_asics() for asic_id in range(num_asics): expected_running_containers.add(container_name + str(asic_id)) - elif feature_table[container_name]["state"] == 'always_enabled': - always_running_containers.add(container_name) else: expected_running_containers.add(container_name) - + if feature_table[container_name]["state"] == 'always_enabled': + if multi_asic.is_multi_asic(): + if feature_table[container_name]["has_global_scope"] == "True": + always_running_containers.add(container_name) + if feature_table[container_name]["has_per_asic_scope"] == "True": + num_asics = multi_asic.get_num_asics() + for asic_id in range(num_asics): + always_running_containers.add(container_name + str(asic_id)) + else: + always_running_containers.add(container_name) return expected_running_containers, always_running_containers - def get_current_running_from_DB(always_running_containers): """ @summary: This function will get the current running container list From 3ccf4e556c271fbc5719343c389c7581efaaa3e6 Mon Sep 17 00:00:00 2001 From: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com> Date: Tue, 22 Feb 2022 18:28:51 -0800 Subject: [PATCH 2/6] Update container_checker Update an indent --- files/image_config/monit/container_checker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/monit/container_checker b/files/image_config/monit/container_checker index 7411cd581a12..63bd7b3e182d 100755 --- a/files/image_config/monit/container_checker +++ b/files/image_config/monit/container_checker @@ -43,7 +43,7 @@ def get_expected_running_containers(): always_running_containers = set() for container_name in feature_table.keys(): - if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: + if feature_table[container_name]["state"] not in ["disabled", "always_disabled"]: if multi_asic.is_multi_asic(): if feature_table[container_name]["has_global_scope"] == "True": expected_running_containers.add(container_name) From 2749ef1f13b63de69430fe436dea1a686da4674c Mon Sep 17 00:00:00 2001 From: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com> Date: Wed, 9 Nov 2022 17:34:04 -0800 Subject: [PATCH 3/6] add psu info --- .../x86_64-arista_7800_sup/platform.json | 171 +++++++++++++++++- 1 file changed, 170 insertions(+), 1 deletion(-) diff --git a/device/arista/x86_64-arista_7800_sup/platform.json b/device/arista/x86_64-arista_7800_sup/platform.json index 958c57ac498c..d475bd662e5a 100644 --- a/device/arista/x86_64-arista_7800_sup/platform.json +++ b/device/arista/x86_64-arista_7800_sup/platform.json @@ -4,7 +4,176 @@ "components": [], "fans": [], "fan_drawers": [], - "psus": [], + "psus": [ + { + "name": "psu1", + "fans": [ + { + "name": "psu1/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "psu2", + "fans": [ + { + "name": "psu2/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + } + { + "name": "psu3", + "fans": [ + { + "name": "psu3/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "psu4", + "fans": [ + { + "name": "psu4/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + } + { + "name": "psu5", + "fans": [ + { + "name": "psu5/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "psu6", + "fans": [ + { + "name": "psu6/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + } + { + "name": "psu7", + "fans": [ + { + "name": "psu7/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "psu8", + "fans": [ + { + "name": "psu8/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + } + { + "name": "psu9", + "fans": [ + { + "name": "psu9/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "psu10", + "fans": [ + { + "name": "psu10/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + } + { + "name": "psu11", + "fans": [ + { + "name": "psu11/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + }, + { + "name": "psu12", + "fans": [ + { + "name": "psu12/1", + "speed": { + "controllable": false + }, + "status_led": { + "controllable": false + } + } + ] + } + ], "thermals": [], "sfps": [] }, From 1ad1ee3e1139d4119921800b55a3acd727615eec Mon Sep 17 00:00:00 2001 From: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com> Date: Thu, 10 Nov 2022 10:10:12 -0800 Subject: [PATCH 4/6] add comma --- device/arista/x86_64-arista_7800_sup/platform.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/device/arista/x86_64-arista_7800_sup/platform.json b/device/arista/x86_64-arista_7800_sup/platform.json index d475bd662e5a..8dc0a4565258 100644 --- a/device/arista/x86_64-arista_7800_sup/platform.json +++ b/device/arista/x86_64-arista_7800_sup/platform.json @@ -32,7 +32,7 @@ } } ] - } + }, { "name": "psu3", "fans": [ @@ -60,7 +60,7 @@ } } ] - } + }, { "name": "psu5", "fans": [ @@ -88,7 +88,7 @@ } } ] - } + }, { "name": "psu7", "fans": [ @@ -116,7 +116,7 @@ } } ] - } + }, { "name": "psu9", "fans": [ @@ -144,7 +144,7 @@ } } ] - } + }, { "name": "psu11", "fans": [ From 99328ce1db5617cb109d58fc2f0631671eae73c4 Mon Sep 17 00:00:00 2001 From: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com> Date: Mon, 14 Nov 2022 14:26:51 -0800 Subject: [PATCH 5/6] add 1 more thermal entry --- device/arista/x86_64-arista_7800r3_48cq2_lc/platform.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device/arista/x86_64-arista_7800r3_48cq2_lc/platform.json b/device/arista/x86_64-arista_7800r3_48cq2_lc/platform.json index edd9039804d7..30e4f32aff8a 100644 --- a/device/arista/x86_64-arista_7800r3_48cq2_lc/platform.json +++ b/device/arista/x86_64-arista_7800r3_48cq2_lc/platform.json @@ -20,6 +20,9 @@ }, { "name": "PCIE" + }, + { + "name": "Cpu SBTSI" } ], "sfps": [ From 92543e0a3ac1d4a8b89d7efca492016074807bc7 Mon Sep 17 00:00:00 2001 From: wenyiz2021 <91497961+wenyiz2021@users.noreply.github.com> Date: Mon, 14 Nov 2022 14:27:49 -0800 Subject: [PATCH 6/6] add 1 more thermal entry --- device/arista/x86_64-arista_7800r3_48cqm2_lc/platform.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device/arista/x86_64-arista_7800r3_48cqm2_lc/platform.json b/device/arista/x86_64-arista_7800r3_48cqm2_lc/platform.json index 18798cabb33a..a714c370bea9 100644 --- a/device/arista/x86_64-arista_7800r3_48cqm2_lc/platform.json +++ b/device/arista/x86_64-arista_7800r3_48cqm2_lc/platform.json @@ -20,6 +20,9 @@ }, { "name": "PCIE" + }, + { + "name": "Cpu SBTSI" } ], "sfps": [