CI: fix kolla-ansible installation after cryptography 3.4 release
Installing kolla-ansible system-wide on CentOS 8 fails with: ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. This change switches to using pip --user when installing kolla-ansible. Also fixes an issue with ansible-lint which was failing on etc/kolla/globals.yml due to a missing space before comments. [1] https://github.com/pyca/cryptography/issues/5753 Change-Id: Ifaf1948ed5d42eebaa62d7bad375bbfc12b134d5 Closes-Bug: #1915141
This commit is contained in:
parent
ddf462d2a0
commit
3dd6834a61
|
@ -50,6 +50,8 @@
|
||||||
- "--quiet"
|
- "--quiet"
|
||||||
|
|
||||||
- hosts: primary
|
- hosts: primary
|
||||||
|
environment:
|
||||||
|
PATH: "{{ ansible_env.HOME + '/.local/bin:' + ansible_env.PATH }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: check for existence of ara sqlite
|
- name: check for existence of ara sqlite
|
||||||
stat:
|
stat:
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
dashboard_enabled: "{{ openstack_core_enabled }}"
|
dashboard_enabled: "{{ openstack_core_enabled }}"
|
||||||
upper_constraints_file: "{{ ansible_env.HOME }}/src/opendev.org/openstack/requirements/upper-constraints.txt"
|
upper_constraints_file: "{{ ansible_env.HOME }}/src/opendev.org/openstack/requirements/upper-constraints.txt"
|
||||||
docker_image_tag_suffix: "{{ '-aarch64' if ansible_architecture == 'aarch64' else '' }}"
|
docker_image_tag_suffix: "{{ '-aarch64' if ansible_architecture == 'aarch64' else '' }}"
|
||||||
|
pip_user_path_env:
|
||||||
|
PATH: "{{ ansible_env.HOME + '/.local/bin:' + ansible_env.PATH }}"
|
||||||
|
|
||||||
- name: Install dig for Designate testing
|
- name: Install dig for Designate testing
|
||||||
become: true
|
become: true
|
||||||
|
@ -65,6 +67,7 @@
|
||||||
# NOTE(yoctozepto): to avoid issues with IPv6 not enabled in the docker daemon
|
# NOTE(yoctozepto): to avoid issues with IPv6 not enabled in the docker daemon
|
||||||
# and since we don't need isolated networks here, use host networking
|
# and since we don't need isolated networks here, use host networking
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
environment: "{{ pip_user_path_env }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: detect whether need build images
|
- name: detect whether need build images
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -200,6 +203,14 @@
|
||||||
state: directory
|
state: directory
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
|
||||||
- name: install kolla-ansible and dependencies
|
- name: install kolla-ansible and dependencies
|
||||||
vars:
|
vars:
|
||||||
# Test latest ansible version on Ubuntu, minimum supported on others.
|
# Test latest ansible version on Ubuntu, minimum supported on others.
|
||||||
|
@ -210,8 +221,7 @@
|
||||||
- "ansible{{ ansible_version_constraint }}"
|
- "ansible{{ ansible_version_constraint }}"
|
||||||
- "ara<1.0.0"
|
- "ara<1.0.0"
|
||||||
executable: "pip3"
|
executable: "pip3"
|
||||||
extra_args: "-c {{ upper_constraints_file }}"
|
extra_args: "-c {{ upper_constraints_file }} --user"
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: get ARA callback plugin path
|
- name: get ARA callback plugin path
|
||||||
command: "python3 -m ara.setup.callback_plugins"
|
command: "python3 -m ara.setup.callback_plugins"
|
||||||
|
@ -486,6 +496,7 @@
|
||||||
|
|
||||||
- hosts: primary
|
- hosts: primary
|
||||||
any_errors_fatal: true
|
any_errors_fatal: true
|
||||||
|
environment: "{{ pip_user_path_env }}"
|
||||||
tasks:
|
tasks:
|
||||||
# Upgrade: update config.
|
# Upgrade: update config.
|
||||||
- block:
|
- block:
|
||||||
|
@ -529,8 +540,7 @@
|
||||||
pip:
|
pip:
|
||||||
name: "{{ kolla_ansible_src_dir }}"
|
name: "{{ kolla_ansible_src_dir }}"
|
||||||
executable: pip3
|
executable: pip3
|
||||||
extra_args: "-c {{ upper_constraints_file }}"
|
extra_args: "-c {{ upper_constraints_file }} --user"
|
||||||
become: true
|
|
||||||
|
|
||||||
# Update passwords.yml to include any new passwords added in this
|
# Update passwords.yml to include any new passwords added in this
|
||||||
# release.
|
# release.
|
||||||
|
@ -629,6 +639,7 @@
|
||||||
|
|
||||||
- hosts: primary
|
- hosts: primary
|
||||||
any_errors_fatal: true
|
any_errors_fatal: true
|
||||||
|
environment: "{{ pip_user_path_env }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: Run reconfigure.sh script
|
- name: Run reconfigure.sh script
|
||||||
script:
|
script:
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -126,7 +126,7 @@ setenv = {[testenv:linters]setenv}
|
||||||
deps = {[testenv:linters]deps}
|
deps = {[testenv:linters]deps}
|
||||||
commands =
|
commands =
|
||||||
python {toxinidir}/tools/validate-all-file.py
|
python {toxinidir}/tools/validate-all-file.py
|
||||||
ansible-lint -p --exclude {toxinidir}/tests --exclude {toxinidir}/roles
|
ansible-lint -p --exclude {toxinidir}/tests --exclude {toxinidir}/roles --exclude {toxinidir}/etc
|
||||||
|
|
||||||
[testenv:yamllint]
|
[testenv:yamllint]
|
||||||
deps = {[testenv:linters]deps}
|
deps = {[testenv:linters]deps}
|
||||||
|
|
Loading…
Reference in New Issue