Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run pytest when neighbor device is SONiC #4454

Open
xjasonlyu opened this issue Oct 11, 2021 · 2 comments
Open

Failed to run pytest when neighbor device is SONiC #4454

xjasonlyu opened this issue Oct 11, 2021 · 2 comments
Assignees

Comments

@xjasonlyu
Copy link
Contributor

Description

Failed to complete a pytest when using SONiC image as the neighbor devices.

Steps to reproduce the issue:

  1. Setup testbed step by step based on KVM Testbed Setup
  2. Choose SONiC image as the neighbor devices
  3. Run a pytest, e.g. ./run_tests.sh -n vms-kvm-t0 -d vlab-01 -c bgp/test_bgp_fact.py -f vtestbed.csv -i veos_vtb -e "--neighbor_type=sonic"

Describe the results you received:

Error message says the VM0100 doesn't have a valid interface Ethernet1 (because Ethernet1 doesn't exists in SONiC VM).

E           RunAnsibleModuleFail: run module command failed, Ansible Results =>
E           {
E               "changed": true, 
E               "cmd": [
E                   "sudo", 
E                   "config", 
E                   "interface", 
E                   "startup", 
E                   "Ethernet1"
E               ], 
E               "delta": "0:00:00.452509", 
E               "end": "2021-10-08 02:53:28.062707", 
E               "failed": true, 
E               "invocation": {
E                   "module_args": {
E                       "_raw_params": "sudo config interface startup Ethernet1", 
E                       "_uses_shell": false, 
E                       "argv": null, 
E                       "chdir": null, 
E                       "creates": null, 
E                       "executable": null, 
E                       "removes": null, 
E                       "stdin": null, 
E                       "stdin_add_newline": true, 
E                       "strip_empty_ends": true, 
E                       "warn": true
E                   }
E               }, 
E               "msg": "non-zero return code", 
E               "rc": 2, 
E               "start": "2021-10-08 02:53:27.610198", 
E               "stderr": "Usage: config interface startup [OPTIONS] <interface_name>\nTry \"config interface startup -h\" for help.\n\nError: Interface name is invalid. Please enter a valid interface name!!", 
E               "stderr_lines": [
E                   "Usage: config interface startup [OPTIONS] <interface_name>", 
E                   "Try \"config interface startup -h\" for help.", 
E                   "", 
E                   "Error: Interface name is invalid. Please enter a valid interface name!!"
E               ], 
E               "stdout": "", 
E               "stdout_lines": [], 
E               "warnings": [
E                   "Consider using 'become', 'become_method', and 'become_user' rather than running sudo"
E               ]
E           }

complex_args = {}
filename   = '/data/sonic-mgmt/tests/common/devices/sonic.py'
function_name = 'no_shutdown'
index      = 0
line_number = 818
lines      = ['        return self.command("sudo config interface startup {}".format(ifname))\n']
module_args = ('sudo config interface startup Ethernet1',)
module_async = False
module_ignore_errors = False
previous_frame = <frame object at 0x55ffb6b55720>
res        = {'stderr_lines': [u"Usage: config interface startup [OPTIONS] <interface_name>... using 'become', 'become_method', and 'become_user' rather than running sudo"]}
self       = <SonicHost> VM0100
verbose    = True

common/devices/base.py:89: RunAnsibleModuleFail</error></testcase></testsuite>

Describe the results you expected:

Pass the pytest successfully.

Additional information you deem important:

Output of show version:

SONiC Software Version: SONiC.master.42007-34267393b
Distribution: Debian 10.10
Kernel: 4.19.0-12-2-amd64
Build commit: 34267393b
Build date: Thu Oct  7 14:44:41 UTC 2021
Built by: AzDevOps@sonic-build-workers-000RTT

Platform: x86_64-kvm_x86_64-r0
HwSKU: Force10-S6000
ASIC: vs
ASIC Count: 1
Serial Number: N/A
Model Number: N/A
Hardware Revision: N/A
Uptime: 05:40:58 up 2 days,  1:50,  1 user,  load average: 1.10, 1.07, 1.08

Docker images:
REPOSITORY                    TAG                      IMAGE ID            SIZE
docker-dhcp-relay             latest                   3a0e8e1ad74d        427MB
docker-gbsyncd-vs             latest                   f61446a7956e        421MB
docker-gbsyncd-vs             master.42007-34267393b   f61446a7956e        421MB
docker-syncd-vs               latest                   d13ae0653b44        421MB
docker-syncd-vs               master.42007-34267393b   d13ae0653b44        421MB
docker-teamd                  latest                   7b99244e6921        426MB
docker-teamd                  master.42007-34267393b   7b99244e6921        426MB
docker-platform-monitor       latest                   aec8b8bc013e        631MB
docker-platform-monitor       master.42007-34267393b   aec8b8bc013e        631MB
docker-nat                    latest                   0212ed0ab6e6        429MB
docker-nat                    master.42007-34267393b   0212ed0ab6e6        429MB
docker-sonic-mgmt-framework   latest                   fddb931a7885        569MB
docker-sonic-mgmt-framework   master.42007-34267393b   fddb931a7885        569MB
docker-router-advertiser      latest                   740b761513ca        414MB
docker-router-advertiser      master.42007-34267393b   740b761513ca        414MB
docker-lldp                   latest                   4c733601ad36        454MB
docker-lldp                   master.42007-34267393b   4c733601ad36        454MB
docker-orchagent              latest                   b33ac0315d8c        444MB
docker-orchagent              master.42007-34267393b   b33ac0315d8c        444MB
docker-macsec                 latest                   097fca4f4cf6        429MB
docker-macsec                 master.42007-34267393b   097fca4f4cf6        429MB
docker-snmp                   latest                   6ca8ec872696        456MB
docker-snmp                   master.42007-34267393b   6ca8ec872696        456MB
docker-fpm-frr                latest                   9d8455b6f67a        444MB
docker-fpm-frr                master.42007-34267393b   9d8455b6f67a        444MB
docker-sonic-telemetry        latest                   1387526779aa        502MB
docker-sonic-telemetry        master.42007-34267393b   1387526779aa        502MB
docker-sflow                  latest                   c7dcc326269e        427MB
docker-sflow                  master.42007-34267393b   c7dcc326269e        427MB
docker-database               latest                   c1bc49f7bba1        414MB
docker-database               master.42007-34267393b   c1bc49f7bba1        414MB
@yxieca
Copy link
Collaborator

yxieca commented Oct 20, 2021

@xjasonlyu can you confirm that you are deploying (add-topo) with -k vsonic specified? Could it be that you deployed a testbed with ceos but trying to run test with setting neighbor type to sonic? @Pterosaur can help you further.

@Pterosaur
Copy link
Contributor

Pterosaur commented Oct 20, 2021

Hi @xjasonlyu , it's a known issue that is being fixed by PR sonic-net/sonic-buildimage#8971 and #4341. Please check the sonic image of neighbor devices includes the PR sonic-net/sonic-buildimage#8971 and manually merge the PR #4341 to sonic-mgmt repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants