Open hsluoyz opened 3 years ago
Did you run the testbed-cli.sh
script inside a sonic-mgmt docker container?
If you use the sonic-mgmt docker container to run the testbed-cli.sh
tool, there is no need to install dependencies stated in document https://github.com/Azure/sonic-mgmt/blob/master/docs/ansible/README.md#installing-ansible-on-ubuntu-14044-lts which is outdated. The default python environment in the sonic-mgmt docker container is python2. This should be able to temporarily workaround issue #3730
I'm following this docs: https://github.com/Azure/sonic-mgmt/blob/master/docs/testbed/README.testbed.VsSetup.md#vsonic to setup a testbed. I had an error running:
Error:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'natsort' fatal: [STR-ACS-VSERV-01 -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/luo/.ansible/tmp/ansible-tmp-1625367004.6761444-45386379060534/AnsiballZ_conn_graph_facts.py\", line 102, in <module>\n _ansiballz_main()\n File \"/home/luo/.ansible/tmp/ansible-tmp-1625367004.6761444-45386379060534/AnsiballZ_conn_graph_facts.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/luo/.ansible/tmp/ansible-tmp-1625367004.6761444-45386379060534/AnsiballZ_conn_graph_facts.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.conn_graph_facts', init_globals=None, run_name='__main__', alter_sys=True)\n File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_conn_graph_facts_payload_9ea4wxxs/ansible_conn_graph_facts_payload.zip/ansible/modules/conn_graph_facts.py\", line 11, in <module>\nModuleNotFoundError: No module named 'natsort'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
It seems that
natsort
python module needs to be installed, but it's not mentioned in docs: https://github.com/Azure/sonic-mgmt/blob/master/docs/ansible/README.md#installing-ansible-on-ubuntu-14044-ltsCan we improve the docs for it?
Also the Ubuntu 14.04 mentioned in the docs is too old. I'm using Ubuntu 20.04 now. I don't know if there's any difference in the instructions..
Full log: