From a73e89f03f62124017d8f1ee02b4f8137232bd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Sat, 26 Jun 2021 19:11:07 +0000 Subject: [PATCH] [CI] Do not set ansible_python_interpreter for Zuul Zuul 4.6.0 does not allow to set ansible_python_interpreter. [1] Instead, with the current Zuul and Ansible, this should be automatically set to the proper python. This patch is required to restore the jobs which are ignored otherwise. [2] [3] Additionally, this change avoids the use of Ansible's pip module because it tries to use setuptools from the ansible_python_interpreter first even if another executable is set. [1] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023291.html [2] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023326.html [3] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023321.html Change-Id: I53e666d59d0cce26e38c6f66a39eb204bda502d3 --- tests/run.yml | 28 +++++++++++++--------------- zuul.d/base.yaml | 3 --- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/tests/run.yml b/tests/run.yml index 5c463e75ae..5b40978bec 100644 --- a/tests/run.yml +++ b/tests/run.yml @@ -196,22 +196,20 @@ # NOTE(mgoddard): We need a recent pip to install the latest cryptography # library. See https://github.com/pyca/cryptography/issues/5753 - name: install pip 19.1.1+ - pip: - name: "pip>=19.1.1" - executable: "pip3" - extra_args: "--user" + command: >- + python3 -m pip install --user + pip>=19.1.1 - name: install kolla-ansible and dependencies vars: # Test latest ansible version on Ubuntu, minimum supported on others. ansible_version_constraint: "{{ '==2.9.*' if is_upgrade else '==2.10.*' }}" - pip: - name: - - "{{ kolla_ansible_src_dir }}" - - "ansible{{ ansible_version_constraint }}" - - "ara<1.0.0" - executable: "pip3" - extra_args: "-c {{ upper_constraints_file }} --user" + command: >- + python3 -m pip install --user + -c {{ upper_constraints_file }} + {{ kolla_ansible_src_dir }} + ansible{{ ansible_version_constraint }} + ara<1.0.0 - name: get ARA callback plugin path command: "python3 -m ara.setup.callback_plugins" @@ -539,10 +537,10 @@ when: item.when | default(true) - name: upgrade kolla-ansible - pip: - name: "{{ kolla_ansible_src_dir }}" - executable: pip3 - extra_args: "-c {{ upper_constraints_file }} --user" + command: >- + python3 -m pip install --user + -c {{ upper_constraints_file }} + {{ kolla_ansible_src_dir }} # Update passwords.yml to include any new passwords added in this # release. diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 4ea767e334..21568f14d5 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -41,9 +41,6 @@ neutron_external_interface_name: "veth-{{ neutron_external_bridge_name }}-ext" neutron_external_vxlan_interface_name: vxlan1 tls_enabled: false - # NOTE(yoctozepto): Ansible on Debian defaults to /usr/bin/python which is - # python2. Let's use python3 instead as expected in 2020 and beyond. - ansible_python_interpreter: python3 configure_swap_size: 0 roles: - zuul: zuul/zuul-jobs