Skip to content

Commit bd0bcd7

Browse files
committed
[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
1 parent 24d3228 commit bd0bcd7

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

tests/run.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -196,22 +196,20 @@
196196
# NOTE(mgoddard): We need a recent pip to install the latest cryptography
197197
# library. See https://github.com/pyca/cryptography/issues/5753
198198
- name: install pip 19.1.1+
199-
pip:
200-
name: "pip>=19.1.1"
201-
executable: "pip3"
202-
extra_args: "--user"
199+
command: >-
200+
python3 -m pip install --user
201+
pip>=19.1.1
203202
204203
- name: install kolla-ansible and dependencies
205204
vars:
206205
# Test latest ansible version on Ubuntu, minimum supported on others.
207206
ansible_version_constraint: "{{ '==2.9.*' if is_upgrade else '==2.10.*' }}"
208-
pip:
209-
name:
210-
- "{{ kolla_ansible_src_dir }}"
211-
- "ansible{{ ansible_version_constraint }}"
212-
- "ara<1.0.0"
213-
executable: "pip3"
214-
extra_args: "-c {{ upper_constraints_file }} --user"
207+
command: >-
208+
python3 -m pip install --user
209+
-c {{ upper_constraints_file }}
210+
{{ kolla_ansible_src_dir }}
211+
ansible{{ ansible_version_constraint }}
212+
ara<1.0.0
215213
216214
- name: get ARA callback plugin path
217215
command: "python3 -m ara.setup.callback_plugins"
@@ -539,10 +537,10 @@
539537
when: item.when | default(true)
540538

541539
- name: upgrade kolla-ansible
542-
pip:
543-
name: "{{ kolla_ansible_src_dir }}"
544-
executable: pip3
545-
extra_args: "-c {{ upper_constraints_file }} --user"
540+
command: >-
541+
python3 -m pip install --user
542+
-c {{ upper_constraints_file }}
543+
{{ kolla_ansible_src_dir }}
546544
547545
# Update passwords.yml to include any new passwords added in this
548546
# release.

zuul.d/base.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
neutron_external_interface_name: "veth-{{ neutron_external_bridge_name }}-ext"
4242
neutron_external_vxlan_interface_name: vxlan1
4343
tls_enabled: false
44-
# NOTE(yoctozepto): Ansible on Debian defaults to /usr/bin/python which is
45-
# python2. Let's use python3 instead as expected in 2020 and beyond.
46-
ansible_python_interpreter: python3
4744
configure_swap_size: 0
4845
roles:
4946
- zuul: zuul/zuul-jobs

0 commit comments

Comments
 (0)