From b440ab4f4010490f991b531037caab15a5cf1ec9 Mon Sep 17 00:00:00 2001 From: Longxiang Lyu <35479537+lolyu@users.noreply.github.com> Date: Wed, 8 Nov 2023 06:44:23 +0800 Subject: [PATCH] [dualtor] Add `mux` to the critical service list to enable sanity check (#10657) * [dualtor] Add `mux` to the critical service list to enable sanity check Signed-off-by: Longxiang Lyu --- tests/common/devices/multi_asic.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/common/devices/multi_asic.py b/tests/common/devices/multi_asic.py index 6fc32137f79..dc1561a7ccc 100644 --- a/tests/common/devices/multi_asic.py +++ b/tests/common/devices/multi_asic.py @@ -73,9 +73,19 @@ def critical_services_tracking_list(self): a_asic_instance = self.asic_instance_from_namespace(namespace=a_asic_name) active_asics.append(a_asic_instance) service_list += self._DEFAULT_SERVICES + + config_facts = self.config_facts(host=self.hostname, source="running")['ansible_facts'] + # NOTE: Add mux to critical services for dualtor + if ( + "DEVICE_METADATA" in config_facts and + "localhost" in config_facts["DEVICE_METADATA"] and + "subtype" in config_facts["DEVICE_METADATA"]["localhost"] and + config_facts["DEVICE_METADATA"]["localhost"]["subtype"] == "DualToR" + ): + service_list.append("mux") + if self.get_facts().get("modular_chassis"): # Update the asic service based on feature table state and asic flag - config_facts = self.config_facts(host=self.hostname, source="running")['ansible_facts'] for service in list(self.sonichost.DEFAULT_ASIC_SERVICES): if config_facts['FEATURE'][service]['has_per_asic_scope'] == "False": self.sonichost.DEFAULT_ASIC_SERVICES.remove(service)