sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
195 stars 714 forks source link

Portmap for DUT not found during deployment of T0 topology #2422

Open richawil opened 3 years ago

richawil commented 3 years ago

sonic_dump_vlab-01_20201028_172224.tar.gz Description

Failure to deploy t0 reference topology due to failure to find DUT portmap file.

Steps to reproduce the issue: Reproduce by following the instructions from the web site https://github.com/Azure/sonic-mgmt/blob/master/ansible/doc/README.testbed.VsSetup.md

At the step where the T0 topology is deployed ./testbed-cli.sh -t vtestbed.csv -m veos_vtb add-topo vms-kvm-t0 password.txt

Describe the results you received: This ansible task fails: TASK [vm_set : Get DUT port alias] ***** Wednesday 28 October 2020 13:05:14 -0400 (0:00:00.352) 0:00:37.172 * fatal: [STR-ACS-VSERV-01]: FAILED! => {"changed": false, "msg": "IO error[Errno 2] No such file or directory: '/usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/port_config.ini'"}

Describe the results you expected: This should not have failed. The DUT does in fact have this file.

Additional information you deem important: Further debugging revealed these values: dut_name=vlab-01 and hwsku=Force10-S6000. caglab@cag-rtp-ucs1-sonic:~/sim/sonic-mgmt/ansible$ cat /tmp/dbg.log Platform type is x86_64-kvm_x86_64-r0 Port config file is /usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/port_config.ini get_portmap from file /usr/share/sonic/device/x86_64-kvm_x86_64-r0/Force10-S6000/port_config.ini

It appears we are running this task on the host server when it should actually be run on the DUT. I was able to work around the issue by editing this task from roles/vm_set/tasks/start_sonic_vm.yml— --- a/ansible/roles/vm_set/tasks/start_sonic_vm.yml +++ b/ansible/roles/vm_set/tasks/start_sonic_vm.yml @@ -28,7 +28,7 @@

Platform: x86_64-kvm_x86_64-r0 HwSKU: Force10-S6000 ASIC: vs Serial Number: 000000 Uptime: 17:21:26 up 1 day, 3:41, 1 user, load average: 5.29, 4.27, 3.86

```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
wangxin commented 3 years ago

Please ensure that the virtual machines are started firstly if you use vEOS to deploy the testbed.

cd ansible
./testbed-cli.sh -t vtestbed.csv -m veos_vtb start-topo-vms vms-kvm-t0 password.txt -vv