You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TASK [vm_set : Create VMs network] **********************************************************************************************************************************************************************************************************
task path: /var/tauser/sonic-mgmt/ansible/roles/vm_set/tasks/start.yml:39
Tuesday 10 November 2020 12:33:56 +0000 (0:00:00.037) 0:00:22.388 ******
Using module file /var/tauser/sonic-mgmt/ansible/roles/vm_set/library/vm_topology.py
Pipelining is enabled.
<10.250.0.245> ESTABLISH SSH CONNECTION FOR USER: tauser
<10.250.0.245> SSH: EXEC sshpass -d8 ssh -o ControlMaster=auto -o ControlPersist=120s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o StrictHostKeyChecking=no -o 'User="tauser"' -o ConnectTimeout=30 -o ControlPath=/var/tauser/.ansible/cp/72c32fe0d2 10.250.0.245 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=dsxlewytnkalmqcaacuqonyuwabtnbyc] password:" -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-dsxlewytnkalmqcaacuqonyuwabtnbyc ; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<10.250.0.245> (1, '\n{"msg": "'VMTopology' object has no attribute 'host_ifaces'", "failed": true, "exception": "WARNING: The below traceback may not be related to the actual failure.\n File \"/tmp/ansible_vm_topology_payload_SQeM5C/main.py\", line 937, in main\n net.create_bridges()\n File \"/tmp/ansible_vm_topology_payload_SQeM5C/main.py\", line 238, in create_bridges\n self.create_ovs_bridge(fp_br_name, self.fp_mtu)\n File \"/tmp/ansible_vm_topology_payload_SQeM5C/main.py\", line 243, in create_ovs_bridge\n if bridge_name not in self.host_ifaces:\n", "invocation": {"module_args": {"max_fp_num": 4, "fp_mtu": 9216, "ptf_bp_ip_addr": null, "ptf_bp_ipv6_addr": null, "duts_mgmt_port": null, "vm_names": ["VM0100", "VM0101", "VM0102", "VM0103", "VM0104", "VM0105", "VM0106", "VM0107", "VM0108", "VM0109", "VM0110", "VM0111", "VM0112", "VM0113", "VM0114", "VM0115", "VM0116", "VM0117", "VM0118", "VM0119", "VM0120", "VM0121", "VM0122", "VM0123", "VM0124", "VM0125", "VM0126", "VM0127", "VM0128", "VM0129", "VM0130", "VM0131"], "cmd": "create", "vm_base": null, "topo": null, "ptf_mgmt_ip_gw": null, "vm_set_name": null, "duts_fp_ports": null, "ptf_mgmt_ip_addr": null, "mgmt_bridge": null, "duts_name": null, "ptf_mgmt_ipv6_addr": null}}}\n', '/usr/local/lib/python2.7/dist-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.\n CryptographyDeprecationWarning,\n')
<10.250.0.245> Failed to connect to the host via ssh: /usr/local/lib/python2.7/dist-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
CryptographyDeprecationWarning,
The full traceback is:
WARNING: The below traceback may not be related to the actual failure.
File "/tmp/ansible_vm_topology_payload_SQeM5C/main.py", line 937, in main
net.create_bridges()
File "/tmp/ansible_vm_topology_payload_SQeM5C/main.py", line 238, in create_bridges
self.create_ovs_bridge(fp_br_name, self.fp_mtu)
File "/tmp/ansible_vm_topology_payload_SQeM5C/main.py", line 243, in create_ovs_bridge
if bridge_name not in self.host_ifaces:
It seems that there was an issue(variable not setting properly) while setting the variable "self.host_ifaces" in "ansible/roles/vm_set/library/vm_topology.py", during the "create" command call. During the call to the below functions "def create_bridges" and "def create_ovs_bridge", the variable "self.host_ifaces" didn't got set. I guess this is the reason, we are seeing this issue.
Steps to reproduce the issue:
./testbed-cli.sh start-vms server_1 password.txt
Describe the results you received:
VM's didn't came up.
Describe the results you expected:
VM's should be up.
$ git log --pretty=oneline | head -n 20 f031f32 [link flap] replace bring_up_fanout_interfaces with in place restoration (#2484) 10e22c6 [BFN] Fix GRE type in show_techsupport test (#2493) 798bc2e Move location of template file used by test_bgp_speaker (#2491) 5e1b912 [Ansible] Fix connection keyword precedence issue (#2492) 0a244b1 [enumerators] unify naming convention of the parameter enumerators (#2494) 5dcdb48 [pytest/lacp]: use lacp timer if lacp rate cmd is not available (#2488) b3fd4f8 [platform/sfp]Enhance the LPM test by performing the test only on cables supporting LPM (#2380) c087041 [bgp_facts]: add back the bgpmon checks (#2490) 8d8c198 [dhcp-pkt-fwd] The src port and dst port of Relayed Packet are both 67 (#2432) 12e4394 [vm_topology]: make debug log more readable (#2485) e644c33 [kvmtest]: add arp tests to kvm test suite (#2482) 31eb717 [vm_topology]: delete existing vm injected interface if exists (#2486) 262246c [ptf map] address ptf map indexing issue (#2483) 6b917b7 [cont_link_flap] address issue in fixture bring_up_fanout_interfaces (#2481) df7620f Make CRM counters available for route_perf test (#2477) 6571830 [kvm/docs] Improve KVM setup instructions (#2476) e6522a5 [SonicHost] Ignore non-zero return code from 'supervisorctl status' in critical_process_status() (#2474) 8c5ea5a [kvmtest]: add script to test minigraph generation (#2465) 8fb9cc9 [vmtopology]: remove host interfaces fetching operations from init method of the VMTopology class (#2446) 0ca783a [multi-dut] Make test_posttest and test_pretest multi-dut ready (#2475)
…2504)
Fixes#2498
In the PR2446, it already removed to get host_ifaces from __init__ method.
For `create_bridge` method, the host_ifaces is not necessary. We can use the ovs
argument `--may-exist` to in case the bridge already exists.
For `destroy_bridge` method, we can use local variable to record the host_ifaces,
then use the `--if-exists` argument in case bridge does not exist.
Signed-off-by: Gord Chen <gord_chen@edge-core.com>
Description
Hi,
I am trying to start the VMS using the command "./testbed-cli.sh start-vms server_1 password.txt" as given in the following link:
https://github.com/Azure/sonic-mgmt/blob/master/ansible/doc/README.testbed.Setup.md
But, I am seeing an error.
TASK [vm_set : Create VMs network] **********************************************************************************************************************************************************************************************************
task path: /var/tauser/sonic-mgmt/ansible/roles/vm_set/tasks/start.yml:39
Tuesday 10 November 2020 12:33:56 +0000 (0:00:00.037) 0:00:22.388 ******
Using module file /var/tauser/sonic-mgmt/ansible/roles/vm_set/library/vm_topology.py
Pipelining is enabled.
<10.250.0.245> ESTABLISH SSH CONNECTION FOR USER: tauser
<10.250.0.245> SSH: EXEC sshpass -d8 ssh -o ControlMaster=auto -o ControlPersist=120s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o StrictHostKeyChecking=no -o 'User="tauser"' -o ConnectTimeout=30 -o ControlPath=/var/tauser/.ansible/cp/72c32fe0d2 10.250.0.245 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=dsxlewytnkalmqcaacuqonyuwabtnbyc] password:" -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-dsxlewytnkalmqcaacuqonyuwabtnbyc ; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<10.250.0.245> (1, '\n{"msg": "'VMTopology' object has no attribute 'host_ifaces'", "failed": true, "exception": "WARNING: The below traceback may not be related to the actual failure.\n File \"/tmp/ansible_vm_topology_payload_SQeM5C/main.py\", line 937, in main\n net.create_bridges()\n File \"/tmp/ansible_vm_topology_payload_SQeM5C/main.py\", line 238, in create_bridges\n self.create_ovs_bridge(fp_br_name, self.fp_mtu)\n File \"/tmp/ansible_vm_topology_payload_SQeM5C/main.py\", line 243, in create_ovs_bridge\n if bridge_name not in self.host_ifaces:\n", "invocation": {"module_args": {"max_fp_num": 4, "fp_mtu": 9216, "ptf_bp_ip_addr": null, "ptf_bp_ipv6_addr": null, "duts_mgmt_port": null, "vm_names": ["VM0100", "VM0101", "VM0102", "VM0103", "VM0104", "VM0105", "VM0106", "VM0107", "VM0108", "VM0109", "VM0110", "VM0111", "VM0112", "VM0113", "VM0114", "VM0115", "VM0116", "VM0117", "VM0118", "VM0119", "VM0120", "VM0121", "VM0122", "VM0123", "VM0124", "VM0125", "VM0126", "VM0127", "VM0128", "VM0129", "VM0130", "VM0131"], "cmd": "create", "vm_base": null, "topo": null, "ptf_mgmt_ip_gw": null, "vm_set_name": null, "duts_fp_ports": null, "ptf_mgmt_ip_addr": null, "mgmt_bridge": null, "duts_name": null, "ptf_mgmt_ipv6_addr": null}}}\n', '/usr/local/lib/python2.7/dist-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.\n CryptographyDeprecationWarning,\n')
<10.250.0.245> Failed to connect to the host via ssh: /usr/local/lib/python2.7/dist-packages/cryptography/init.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
CryptographyDeprecationWarning,
The full traceback is:
WARNING: The below traceback may not be related to the actual failure.
File "/tmp/ansible_vm_topology_payload_SQeM5C/main.py", line 937, in main
net.create_bridges()
File "/tmp/ansible_vm_topology_payload_SQeM5C/main.py", line 238, in create_bridges
self.create_ovs_bridge(fp_br_name, self.fp_mtu)
File "/tmp/ansible_vm_topology_payload_SQeM5C/main.py", line 243, in create_ovs_bridge
if bridge_name not in self.host_ifaces:
fatal: [STR-ACS-SERV-01]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"cmd": "create",
"duts_fp_ports": null,
"duts_mgmt_port": null,
"duts_name": null,
"fp_mtu": 9216,
"max_fp_num": 4,
"mgmt_bridge": null,
"ptf_bp_ip_addr": null,
"ptf_bp_ipv6_addr": null,
"ptf_mgmt_ip_addr": null,
"ptf_mgmt_ip_gw": null,
"ptf_mgmt_ipv6_addr": null,
"topo": null,
"vm_base": null,
"vm_names": [
"VM0100",
"VM0101",
"VM0102",
"VM0103",
"VM0104",
"VM0105",
"VM0106",
"VM0107",
"VM0108",
"VM0109",
"VM0110",
"VM0111",
"VM0112",
"VM0113",
"VM0114",
"VM0115",
"VM0116",
"VM0117",
"VM0118",
"VM0119",
"VM0120",
"VM0121",
"VM0122",
"VM0123",
"VM0124",
"VM0125",
"VM0126",
"VM0127",
"VM0128",
"VM0129",
"VM0130",
"VM0131"
],
"vm_set_name": null
}
},
"msg": "'VMTopology' object has no attribute 'host_ifaces'"
}
It seems that there was an issue(variable not setting properly) while setting the variable "self.host_ifaces" in "ansible/roles/vm_set/library/vm_topology.py", during the "create" command call. During the call to the below functions "def create_bridges" and "def create_ovs_bridge", the variable "self.host_ifaces" didn't got set. I guess this is the reason, we are seeing this issue.
Steps to reproduce the issue:
Describe the results you received:
VM's didn't came up.
Describe the results you expected:
VM's should be up.
Additional information you deem important:
Complete Output with -vvv option:
The text was updated successfully, but these errors were encountered: