sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
201 stars 727 forks source link

Ansible ping to vSwitch is unreachable for deployed testbed for topology ptf32 #1536

Open dipalipatel25 opened 4 years ago

dipalipatel25 commented 4 years ago

Description deploy tesbed for topology ptf32. ping the vSwitch once the testbed is deployed. vSwitch is unreachable. On the vSwitch pinging the mgmt ip fails. cli command: ./testbed-cli.sh -t vtestbed.csv -m veos.vtb add-topo vms-kvm-ptf32 password.txt -vvv

vtestbed.csv: vms-kvm-ptf32,vms6-1,ptf32,docker-ptf,ptf_vms6-1,10.250.0.106/24,server_1,,vlab-01,Tests virtual switch vm

Vlab-01 is deployed successfully after running the script.

Steps to reproduce the issue:

  1. deploy testbed for topology ptf32 for vswitch
  2. ansible ping or try to ssh to the vSwitch

Describe the results you received: -- ansible -m ping -i lab vlab-01 -u root [WARNING]: Unhandled error in Python interpreter discovery for host vlab-01: Failed to connect to the host via ssh: ssh: connect to host 10.250.0.101 port 22: No route to host

vlab-01 | UNREACHABLE! => { "changed": false, "msg": "Data could not be sent to remote host \"10.250.0.101\". Make sure this host can be reached over ssh: ssh: connect to host 10.250.0.101 port 22: No route to host\r\n", "unreachable": true }

Describe the results you expected: -expect to ssh to vlab-01 or ping successfully to host

li7hui commented 4 years ago

as it the error msg mentioned No route to host, first check whether you can ping 10.250.0.101 from vlab-01

dipalipatel25 commented 4 years ago

I can ping 10.250.0.101 from vlab-01

ping 10.250.0.101 PING 10.250.0.101 (10.250.0.101) 56(84) bytes of data. 64 bytes from 10.250.0.101: icmp_seq=1 ttl=64 time=0.061 ms 64 bytes from 10.250.0.101: icmp_seq=2 ttl=64 time=0.086 ms --- 10.250.0.101 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2008ms rtt min/avg/max/mdev = 0.061/0.070/0.086/0.011 ms

On vlab-01 ping the management ip vlab-01 ip ---> 10.250.0.101 mgmt-ip ---> 10.250.0.245

root@vlab-01:/home/admin# ping 10.250.0.245 PING 10.250.0.245 (10.250.0.245) 56(84) bytes of data. From 10.250.0.101 icmp_seq=1 Destination Host Unreachable From 10.250.0.101 icmp_seq=2 Destination Host Unreachable From 10.250.0.101 icmp_seq=3 Destination Host Unreachable --- 10.250.0.245 ping statistics --- 6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5115ms pipe 4

traceroute 10.250.0.245 traceroute to 10.250.0.245 (10.250.0.245), 30 hops max, 60 byte packets 1 10.250.0.101 (10.250.0.101) 3074.189 ms !H 3073.671 ms !H 3073.644 ms !H

dipalipatel25 commented 4 years ago

By adding the management ip to the bridge interface, i was able to work around the problem. But i still need to figure out why was this not configured as a part of topo-add for ptf32.