Skip to content

[Bug]: telemetry/test_telemetry.py::test_telemetry_ouput and /test_mgmt_ipv6_only.py::test_telemetry_output_ipv6_only failed at internal PR test #14448

@StormLiangMS

Description

@StormLiangMS

Issue Description

https://elastictest.org/scheduler/testplan/66da09e1f90c6cd947f4e495?testcase=telemetry%2Ftest_telemetry.py%7C%7C%7C2&type=console&leftSideViewMode=detail&prop=status&order=ascending&searchTestCase=

always run into failure, which blocked the internal PR test for weeks.

Results you see

elemetry/test_telemetry.py::test_telemetry_ouput[vlab-03-False]
-------------------------------- live log call ---------------------------------
21:19:53 init.pytest_runtest_call L0040 ERROR | Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 1788, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_hooks.py", line 513, in call
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_manager.py", line 120, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 139, in _multicall
raise exception.with_traceback(exception.traceback)
File "/usr/local/lib/python3.8/dist-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
File "/usr/local/lib/python3.8/dist-packages/_pytest/python.py", line 194, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/var/src/sonic-mgmt/tests/telemetry/test_telemetry.py", line 122, in test_telemetry_ouput
show_gnmi_out = ptfhost.shell(cmd)['stdout']
File "/var/src/sonic-mgmt/tests/common/devices/base.py", line 131, in _run
raise RunAnsibleModuleFail("run module {} failed".format(self.module_name), res)
tests.common.errors.RunAnsibleModuleFail: run module shell failed, Ansible Results =>
{"changed": true, "cmd": "python /root/gnxi/gnmi_cli_py/py_gnmicli.py -g -t 10.250.0.105 -p 50051 -m get -x COUNTERS/Ethernet0 -xt COUNTERS_DB -o "ndastreamingservertest"", "delta": "0:00:00.948821", "end": "2024-09-05 21:19:53.614096", "failed": true, "msg": "non-zero return code", "rc": 1, "start": "2024-09-05 21:19:52.665275", "stderr": "", "stderr_lines": [], "stdout": "Performing GetRequest, encoding=JSON_IETF to 10.250.0.105 with the following gNMI Path\n ------------------------- \n [elem {\n name: "COUNTERS"\n}\nelem {\n name: "Ethernet0"\n}\n]\nGRPC error\n key GLOBAL:3 not exists in COUNTERS_QUEUE_NAME_MAP", "stdout_lines": ["Performing GetRequest, encoding=JSON_IETF to 10.250.0.105 with the following gNMI Path", " ------------------------- ", " [elem {", " name: "COUNTERS"", "}", "elem {", " name: "Ethernet0"", "}", "]", "GRPC error", " key GLOBAL:3 not exists in COUNTERS_QUEUE_NAME_MAP"]}

FAILED [ 33%]Thursday 05 September 2024 21:20:00 +0000 (0:00:07.053) 0:02:22.499 ****
Thursday 05 September 2024 21:20:01 +0000 (0:00:00.639) 0:02:23.138 ****
Thursday 05 September 2024 21:20:02 +0000 (0:00:00.790) 0:02:23.928 ****
Thursday 05 September 2024 21:20:02 +0000 (0:00:00.699) 0:02:24.628 ****
Thursday 05 September 2024 21:20:08 +0000 (0:00:05.481) 0:02:30.110 ****
Thursday 05 September 2024 21:20:08 +0000 (0:00:00.538) 0:02:30.648 ****
Thursday 05 September 2024 21:20:09 +0000 (0:00:00.598) 0:02:31.247 ****
Thursday 05 September 2024 21:20:10 +0000 (0:00:00.762) 0:02:32.010 ****
Thursday 05 September 2024 21:20:10 +0000 (0:00:00.491) 0:02:32.502 ****

=================================== FAILURES ===================================
_____________________ test_telemetry_ouput[vlab-03-False] ______________________

duthosts = []
enum_rand_one_per_hwsku_hostname = 'vlab-03'
ptfhost = <tests.common.devices.ptf.PTFHost object at 0x7f21606b7550>
setup_streaming_telemetry = None, gnxi_path = '/root/gnxi/'

@pytest.mark.parametrize('setup_streaming_telemetry', [False], indirect=True)
def test_telemetry_ouput(duthosts, enum_rand_one_per_hwsku_hostname, ptfhost,
                         setup_streaming_telemetry, gnxi_path):
    """Run pyclient from ptfdocker and show gnmi server outputself.
    """
    duthost = duthosts[enum_rand_one_per_hwsku_hostname]
    env = GNMIEnvironment(duthost, GNMIEnvironment.TELEMETRY_MODE)
    if duthost.is_supervisor_node():
        pytest.skip(
            "Skipping test as no Ethernet0 frontpanel port on supervisor")
    logger.info('start telemetry output testing')
    dut_ip = duthost.mgmt_ip
    cmd = 'python ' + gnxi_path + 'gnmi_cli_py/py_gnmicli.py -g -t {0} -p {1} -m get -x COUNTERS/Ethernet0 -xt \
        COUNTERS_DB -o "ndastreamingservertest"'.format(dut_ip, env.gnmi_port)
  show_gnmi_out = ptfhost.shell(cmd)['stdout']

cmd = 'python /root/gnxi/gnmi_cli_py/py_gnmicli.py -g -t 10.250.0.105 -p 50051 -m get -x COUNTERS/Ethernet0 -xt COUNTERS_DB -o "ndastreamingservertest"'
dut_ip = '10.250.0.105'
duthost =
duthosts = []
enum_rand_one_per_hwsku_hostname = 'vlab-03'
env = <tests.common.helpers.gnmi_utils.GNMIEnvironment object at 0x7f2158394220>
gnxi_path = '/root/gnxi/'
ptfhost = <tests.common.devices.ptf.PTFHost object at 0x7f21606b7550>
setup_streaming_telemetry = None

telemetry/test_telemetry.py:122:

Results you expected to see

test can pass

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions