Skip to content

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

@richawil

Description

@richawil

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 @@

  • name: Get DUT port alias
    port_alias: hwsku={{ hostvars[dut_name].hwsku }}
  • delegate_to: localhost
  • delegate_to: vlab-01

    Output of show version:

SONiC Software Version: SONiC.master.424-ebdfb4be
Distribution: Debian 10.4
Kernel: 4.19.0-9-2-amd64
Build commit: ebdfb4b
Build date: Wed Jul 22 17:17:01 UTC 2020
Built by: johnar@jenkins-worker-9

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)
```

Metadata

Metadata

Assignees

No one assigned

    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