Open yanjundeng opened 2 years ago
@yozhao101 please take a look
@yxieca Acked. I will take a look and then update the status at here.
@yozhao101 any update on this issue?
@yozhao101 any updates on this one?
@yanjundeng Can you share the SONiC image verion on your testbed please?
any updates on this issue @yozhao101 , this is affecting test pass %.
@yanjundeng getting back on the question raised. Can you share the SONiC image verion on your testbed please?
The original test image is : "build_version": "azure_cisco_202012.14-dirty-20211120.142355"
Description If the feature's status is "always_disabled", the test_containers_autorestart script could fail on this feature. for example, /data/tests/metadata/m64-t1-lag.json: "features": { "lldp": "enabled", "pmon": "enabled", "sflow": "disabled", "database": "always_enabled", "radv": "enabled", "telemetry": "enabled", "snmp": "enabled", "mux": "always_disabled", "bgp": "enabled", "dhcp_relay": "enabled", "mgmt-framework": "enabled", "nat": "disabled", "teamd": "enabled", "syncd": "enabled", "swss": "enabled" }
Based on this json file, test_containers_autorestart will also try autorestart "mux" though its state is "always_disabled".
In the func "generate_dut_feature_container_list" of sonic-mgmt/tests/conftest.py, it tries to read the above json feature list and generate a container list and run autorestart based on it. Even if the feature's state is "always_disabled", the script still try to run autorestart for this feature.
Steps to reproduce the issue:
Describe the results you received: L0082 DEBUG | /data/tests/common/devices/multi_asic.py::_run_on_asics#97: [m64-zz-2] AnsibleModule::shell Result => {"stderr_lines": ["Error: No such object: mux"], "cmd": "docker inspect -f \{
{.State.Running\} } mux", "end": "2021-11-23 08:28:51.255533", "_ansible_no_log": false, "stdout": "", "changed": true, "failed": true, "delta": "0:00:00.066041", "stderr": "Error: No such object: mux", "rc": 1, "invocation": {"module_args": {"warn": true, "executable": null, "_uses_shell": true, "strip_empty_ends": true, "_raw_params": "docker inspect -f \{ {.State.Running}
} mux", "removes": null, "argv": null, "creates": null, "chdir": null, "stdin_add_newline": true, "stdin": null}}, "stdout_lines": [], "start": "2021-11-23 08:28:51.189492", "msg": "non-zero return code"}
23/11/2021 08:28:54 init.pytest_runtest_call L0039 ERROR | Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/_pytest/python.py", line 1464, in runtest
File "/usr/local/lib/python2.7/dist-packages/pluggy/hooks.py", line 286, in call
File "/usr/local/lib/python2.7/dist-packages/pluggy/manager.py", line 93, in _hookexec
File "/usr/local/lib/python2.7/dist-packages/pluggy/manager.py", line 87, in
File "/usr/local/lib/python2.7/dist-packages/pluggy/callers.py", line 208, in _multicall
File "/usr/local/lib/python2.7/dist-packages/pluggy/callers.py", line 81, in get_result
File "/usr/local/lib/python2.7/dist-packages/pluggy/callers.py", line 187, in _multicall
File "/usr/local/lib/python2.7/dist-packages/_pytest/python.py", line 174, in pytest_pyfunc_call
File "/data/tests/autorestart/test_container_autorestart.py", line 432, in test_containers_autorestart
File "/data/tests/autorestart/test_container_autorestart.py", line 357, in run_test_on_single_container
File "/data/tests/autorestart/test_container_autorestart.py", line 172, in is_container_running
{{{
{.State.Running}} }} {}".format(container_name))
File "/data/tests/common/devices/multi_asic.py", line 97, in _run_on_asics
File "/data/tests/common/devices/base.py", line 89, in _run
RunAnsibleModuleFail: run module shell failed, Ansible Results =>
{
{.State.Running\} } mux",
{.State.Running}
} mux",
}
Analysis in progress
Describe the results you expected: Should skip the feature which state is "always_disabled".
Additional information you deem important: