Closed jingvar closed 3 years ago
Hi @jingvar can you tell us which Python version is /usr/bin/python?
I'm surprised that installing python-setuptools helped, since it is for python2: https://packages.ubuntu.com/focal/python-setuptools
Sorry, my fault ` TASK [kolla-ansible : Ensure the latest version of pip is installed] *** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named pkg_resources failed: [localhost] (item={'name': 'pip'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "pip"}, "msg": "Failed to import the required Python library (setuptools) on rare-ewe's Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
PLAY RECAP ***** localhost : ok=6 changed=2 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
Kayobe playbook(s) /home/ubuntu/kayobe/ansible/kolla-ansible.yml exited 2 ubuntu@rare-ewe:~/kayobe$ ls /usr/bin/py* /usr/bin/py3clean /usr/bin/pydoc /usr/bin/pygettext2 /usr/bin/pyjwt3 /usr/bin/python2.7 /usr/bin/python3.8-config /usr/bin/py3compile /usr/bin/pydoc2 /usr/bin/pygettext2.7 /usr/bin/python /usr/bin/python2.7-config /usr/bin/pyvenv /usr/bin/py3versions /usr/bin/pydoc2.7 /usr/bin/pygettext3 /usr/bin/python-config /usr/bin/python3 /usr/bin/pyversions /usr/bin/pyclean /usr/bin/pydoc3 /usr/bin/pygettext3.8 /usr/bin/python2 /usr/bin/python3-config /usr/bin/pycompile /usr/bin/pydoc3.8 /usr/bin/pyhtmlizer3 /usr/bin/python2-config /usr/bin/python3.8
ubuntu@rare-ewe:~/kayobe$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
ubuntu@rare-ewe:~/kayobe$ git branch
`
ubuntu@rare-ewe:~/kayobe$ /usr/bin/python Python 2.7.18 (default, Mar 8 2021, 13:02:45) [GCC 9.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information.
ubuntu@rare-ewe:~/kayobe$ sudo apt install python-setuptools ubuntu@rare-ewe:~/kayobe$ sudo apt install python-setuptools TASK [MichaelRigart.interfaces : Debian | install current/latest network packages versions] **** fatal: [seed-hypervisor]: FAILED! => {"changed": false, "msg": "No package matching 'python-selinux' is available"}
I removed requirements to python-selinux
RUNNING HANDLER [MichaelRigart.interfaces : Bounce network devices] **************************************************************************************** fatal: [seed-hypervisor]: FAILED! => {"changed": true, "cmd": ["nohup", "bash", "-c", " returncode=0 ifdown --allow auto braio; if ! ifup --allow auto braio; then\n echo \"Failed to bring up interface braio\";\n returncode=1\nfi; exit $returncode"], "delta": "0:00:00.139404", "end": "2021-06-04 06:02:25.658257", "msg": "non-zero return code", "rc": 1, "start": "2021-06-04 06:02:25.518853", "stderr": "nohup: ignoring input\nifdown: interface braio not configured\nRTNETLINK answers: File exists\nifup: failed to bring up braio", "stderr_lines": ["nohup: ignoring input", "ifdown: interface braio not configured", "RTNETLINK answers: File exists", "ifup: failed to bring up braio"], "stdout": "\nWaiting for braio to get ready (MAXWAIT is 32 seconds).\nFailed to bring up interface braio", "stdout_lines": ["", "Waiting for braio to get ready (MAXWAIT is 32 seconds).", "Failed to bring up interface braio"]}
ubuntu@rare-ewe:~/kayobe$ sudo ip a flush dummy1 ubuntu@rare-ewe:~/kayobe$ sudo ip a flush braio
TASK [ssh-known-host : Scan for SSH keys] ****************************************************************************************************************** [DEPRECATION WARNING]: Distribution Ubuntu 20.04 on host seed-hypervisor should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. failed: [seed-hypervisor] (item=192.168.33.4) => {"ansible_loop_var": "item", "changed": false, "cmd": ["ssh-keyscan", "192.168.33.4"], "delta": "0:00:05.013582", "end": "2021-06-04 06:07:13.944824", "item": "192.168.33.4", "msg": "non-zero return code", "rc": 1, "start": "2021-06-04 06:07:08.931242", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
We probably need to install python-is-python3
in dev/functions
in Kayobe.
Hi @jingvar , I believe this change should fix your issue: https://review.opendev.org/c/openstack/kayobe/+/795068
ubuntu@rare-ewe:~/kayobe$ /usr/bin/python Python 3.8.5 (default, May 27 2021, 13:30:53) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.
exit Use exit() or Ctrl-D (i.e. EOF) to exit quit()
ok: [seed-hypervisor] => (item=192.168.33.4) [DEPRECATION WARNING]: Distribution ubuntu 20.04 on host seed-hypervisor should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
Anyway
fatal: [seed-hypervisor]: FAILED! => {"changed": true, "cmd": ["nohup", "bash", "-c", " returncode=0 ifdown --allow auto braio; if ! ifup --allow auto braio; then\n echo \"Failed to bring up interface braio\";\n returncode=1\nfi; exit $returncode"], "delta": "0:00:00.138236", "end": "2021-06-08 12:51:16.057576", "msg": "non-zero return code", "rc": 1, "start": "2021-06-08 12:51:15.919340", "stderr": "nohup: ignoring input\nifdown: interface braio not configured\nRTNETLINK answers: File exists\nifup: failed to bring up braio", "stderr_lines": ["nohup: ignoring input", "ifdown: interface braio not configured", "RTNETLINK answers: File exists", "ifup: failed to bring up braio"], "stdout": "\nWaiting for braio to get ready (MAXWAIT is 32 seconds).\nFailed to bring up interface braio", "stdout_lines": ["", "Waiting for braio to get ready (MAXWAIT is 32 seconds).", "Failed to bring up interface braio"]}```
ubuntu@rare-ewe:~/kayobe$ ip link 8: braio: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 link/ether 82:19:c5:99:f4:5f brd ff:ff:ff:ff:ff:ff 9: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue master braio state UNKNOWN mode DEFAULT group default qlen 1000 link/ether 82:19:c5:99:f4:5f brd ff:ff:ff:ff:ff:ff
./config/src/kayobe-config/configure-local-networking.sh
8: braio: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 82:19:c5:99:f4:5f brd ff:ff:ff:ff:ff:ff
inet 10.0.2.1/24 scope global braio
valid_lft forever preferred_lft forever
inet 192.168.33.4/24 scope global braio
valid_lft forever preferred_lft forever
9: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue master braio state UNKNOWN group default qlen 1000
link/ether 82:19:c5:99:f4:5f brd ff:ff:ff:ff:ff:ff
./dev/seed-hypervisor-deploy.sh
and the same error
I think you are using the wrong version of Kayobe. If you want to use Ubuntu then you need to use either the master branch or stable/wallaby. You should use the same branch of a-universe-from-nothing.
Yep, I've missed support matrix
Ubuntu 20.04 deployed via MAAS ./dev/seed-hypervisor-deploy.sh
TASK [kolla-ansible : Ensure the latest version of pip is installed] *** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named pkg_resources failed: [localhost] (item={'name': 'pip'}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "pip"}, "msg": "Failed to import the required Python library (setuptools) on kvm01's Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
commit 688d8e167a6d4f1fd65f3d83566a1f56adf388c7 (HEAD -> stable/victoria) Author: Pierre Riteau pierre@stackhpc.com Date: Thu May 27 15:31:06 2021 +0200
the same behavior for commit 37ab622cde3ad7b0e1b3b703f688cd24a0899ba2 (origin/stable/victoria)
To resolve it - apt install python-setuptools