From 068581456fd0928cd71c3e1222e63461ff82f7e5 Mon Sep 17 00:00:00 2001 From: Bartosz Bezak Date: Tue, 7 Mar 2023 16:20:15 +0100 Subject: [PATCH] use OS python to create kolla-ansible venv Currently kayobe creates kolla-ansible venv using kayobe venv python3. There are corner cases when creation k-a venv fails while using kayobe venv created with python 3.6 buggy setuptools/ virtualenv command. Using OS python to create venv solves those corner cases issues and preserves compatibilty. Story: 2010634 Task: 47599 Change-Id: Ie0d9bf895f6714cbb8b0bd31a008eb388f4c51c2 --- ansible/roles/kolla-ansible/defaults/main.yml | 2 +- .../kolla-ansible-venv-os-python-519be05aa4b07e80.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/kolla-ansible-venv-os-python-519be05aa4b07e80.yaml diff --git a/ansible/roles/kolla-ansible/defaults/main.yml b/ansible/roles/kolla-ansible/defaults/main.yml index 82458f77f..3256a3e3a 100644 --- a/ansible/roles/kolla-ansible/defaults/main.yml +++ b/ansible/roles/kolla-ansible/defaults/main.yml @@ -16,7 +16,7 @@ kolla_ansible_source_version: kolla_ansible_venv: "{{ ansible_facts.env['PWD'] }}/kolla-venv" # Python interpreter to use to create Kolla Ansible virtualenv. -kolla_ansible_venv_python: python3 +kolla_ansible_venv_python: /usr/bin/python3 # Extra requirements to install inside the kolla-ansible virtualenv. kolla_ansible_venv_extra_requirements: [] diff --git a/releasenotes/notes/kolla-ansible-venv-os-python-519be05aa4b07e80.yaml b/releasenotes/notes/kolla-ansible-venv-os-python-519be05aa4b07e80.yaml new file mode 100644 index 000000000..b3570b106 --- /dev/null +++ b/releasenotes/notes/kolla-ansible-venv-os-python-519be05aa4b07e80.yaml @@ -0,0 +1,6 @@ +upgrade: + - | + Modifies the default value of ``kolla_ansible_venv_python`` to + ``/usr/bin/python3``. Using operating system python to create + kolla-ansible venv fixes corner cases when using older venvs created with + ``virtualenv`` command.