From 329e82fa968aba2de912dcb47b1dce1172a06911 Mon Sep 17 00:00:00 2001 From: veronica-arista <117375955+veronica-arista@users.noreply.github.com> Date: Sun, 21 Apr 2024 07:33:37 -0700 Subject: [PATCH] [sonic-mgmt] Call docker cmd on appropriate container in generate_telemetry_config() funct (#11552) Description of PR generate_telemetry_config() function already establishes that the GNMI container is 'telemetry' so call docker supervisorctl status using this container name. Summary: Fixes # aristanetworks/sonic-qual.msft#61 --- tests/common/helpers/gnmi_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/common/helpers/gnmi_utils.py b/tests/common/helpers/gnmi_utils.py index 9c812b86c27..52f8a1328d3 100644 --- a/tests/common/helpers/gnmi_utils.py +++ b/tests/common/helpers/gnmi_utils.py @@ -52,7 +52,8 @@ def generate_telemetry_config(self, duthost): self.gnmi_config_table = "TELEMETRY" self.gnmi_container = "telemetry" # GNMI program is telemetry or gnmi-native - res = duthost.shell("docker exec telemetry supervisorctl status", module_ignore_errors=True) + res = duthost.shell("docker exec %s supervisorctl status" % self.gnmi_container, + module_ignore_errors=True) if 'telemetry' in res['stdout']: self.gnmi_program = "telemetry" else: