Remove support for Python2.7 on all upstream jobs

Because upstream OpenStack requirements master branch
(Victoria) removed any support for Python 2.7 upstream
jobs started failing. We where only using Python 2
because infrared installation process fails on
RHEL/CentOS 7 and Python 3 due to lacking SE Linux
Python bindings.

This workaround this issue by removing support
for Python 2.7 and CentOS/RHEL 7. The support for
CentOS 7 could be restored once the IR issue has
been fixed.

Change-Id: I09d2577a0e5cb4c7efbb6863294f63b2dd88de0a
This commit is contained in:
Federico Ressi 2020-05-18 11:55:39 +02:00
parent 5f143a6e69
commit 9cf069dbb0
12 changed files with 38 additions and 145 deletions

View File

@ -2,42 +2,28 @@
# More info at: https://docs.openstack.org/infra/bindep/readme.html
# Red Hat
gcc [platform:redhat]
make [platform:redhat]
python3 [platform:redhat]
bzip2-devel [platform:redhat]
gcc [platform:redhat]
git [platform:redhat]
iproute [platform:redhat]
libffi-devel [platform:redhat]
make [platform:redhat]
openssl-devel [platform:redhat]
python3-devel [platform:redhat !platform:rhel-7]
python3 [platform:redhat]
python3-devel [platform:redhat]
python3-libselinux [platform:redhat]
python3-setuptools [platform:redhat]
python3-wheel [platform:redhat]
python3-virtualenv [platform:redhat]
readline-devel [platform:redhat]
sqlite-devel [platform:redhat]
zlib-devel [platform:redhat]
# RHEL/CentOS 7
libselinux-python [platform:rhel-7]
libselinux-python [platform:centos-7]
python-devel [platform:rhel-7]
python-devel [platform:centos-7]
python-pip [platform:centos-7]
python-pip [platform:rhel-7]
python-virtualenv [platform:centos-7]
python-virtualenv [platform:rhel-7]
# RHEL/CentOS 8
python3-libselinux [platform:rhel-8]
python3-libselinux [platform:centos-8]
python3-virtualenv [platform:rhel-8]
python3-virtualenv [platform:centos-8]
# Ubuntu
gcc [platform:ubuntu]
make [platform:ubuntu]
python3 [platform:ubuntu]
git [platform:ubuntu]
libffi-dev [platform:ubuntu]
libssl-dev [platform:ubuntu]
make [platform:ubuntu]
python3 [platform:ubuntu]
python3-dev [platform:ubuntu]

View File

@ -12,8 +12,7 @@ python_exe_path:
"{{ python_exe_dirs | join(':') }}"
python_version: '3'
python_command: 'python'
python3_command: 'python{{ python_version }}'
python_command: 'python{{ python_version }}'
python_packages: {}
python_info: {}

View File

@ -0,0 +1,25 @@
---
- name: "include platform variables"
include_tasks: platform.yaml
when:
- python_platform is not defined
- name: "validate Python version: {{ python_version }}"
assert:
that:
- (python_version | string).split(".") | length >= 1
- (python_version | string).split(".") | length <= 2
- (python_version | string).split(".")[0] == '3'
- include_tasks: constraints.yaml
- include_tasks: install.yaml
- name: "set python_executable fact"
set_fact:
python_executable: '{{ python_info[python_command].executable }}'

View File

@ -1,5 +1,5 @@
---
- name: "ensure '{{ python3_command }}' command is available"
include_tasks: python3.yaml
when: 'python3_command not in python_info'
- name: "ensure '{{ python_command }}' command is available"
include_tasks: ensure-python3.yaml
when: 'python_command not in python_info'

View File

@ -1,49 +0,0 @@
---
- name: "include platform variables"
include_tasks: platform.yaml
when:
- python_platform is not defined
- name: "validate Python version: {{ python_version }}"
assert:
that:
- (python_version | string).split(".") | length >= 1
- (python_version | string).split(".") | length <= 2
- (python_version | string).split(".")[0] == '3'
- include_tasks: constraints.yaml
- include_tasks: install.yaml
vars:
python_command: '{{ python3_command }}'
- name: "set python3_executable fact"
set_fact:
python3_executable: '{{ python_info[python3_command].executable }}'
- block:
- include_tasks: install.yaml
when: python_command not in python_info
- name: "set python_executable fact"
set_fact:
python_executable: '{{ python_info[python_command].executable }}'
rescue:
- name: "try setting python alternative to '{{ python_alternative }}'"
become: '{{ test_become | bool }}'
command: "alternatives --set python '{{ python_alternative }}'"
ignore_errors: yes
when: 'python_alternative is defined'
- include_tasks: install.yaml
- name: "set python_executable fact"
set_fact:
python_executable: '{{ python_info[python_command].executable }}'

View File

@ -1,16 +1,6 @@
---
python_packages:
python:
- bzip2-devel
- gcc
- make
- openssl-devel
- python2-devel
- python2-pip
- readline-devel
- sqlite-devel
- zlib-devel
python3:
- python3
python3.6:

View File

@ -1,7 +1,5 @@
---
python_alternative: '/usr/bin/python3'
python_packages:
python3:
- python3

View File

@ -1,17 +1,6 @@
---
python_packages:
python:
- aria2
- gcc
- libbz2-dev
- libreadline-dev
- libssl-dev
- libsqlite3-dev
- make
- python
- python-pip
- zlib1g-dev
python3:
- python3
- python3-pip

View File

@ -8,7 +8,7 @@ tox_environment: {}
tox_envlist:
tox_extra_args: ''
tox_python: '{{ python3_executable }}'
tox_python: '{{ python_executable }}'
tox_report_dir: '{{ test_report_dir | realpath }}'
tox_step_name:
tox_step_index: 0

View File

@ -24,14 +24,6 @@
zuul_output_dir: '{{ ansible_user_dir }}/zuul-output'
zuul_work_dir: "{{ zuul.projects['opendev.org/x/tobiko'].src_dir }}"
- job:
name: tobiko-tox-infrared-centos-7
parent: tobiko-tox-infrared
nodeset: centos-7-2-node
voting: false
description: |
Run py36 test cases using tobiko infrared plugin on CentOS 7
- job:
name: tobiko-tox-infrared-centos-8

View File

@ -11,42 +11,6 @@
- secondary
- nodeset:
name: openstack-three-node-centos-7
nodes:
- name: controller
label: centos-7
- name: compute1
label: centos-7
- name: compute2
label: centos-7
groups:
# Node where tests are executed and test results collected
- name: tempest
nodes:
- controller
# Nodes running the compute service
- name: compute
nodes:
- compute1
- compute2
# Nodes that are not the controller
- name: subnode
nodes:
- compute1
- compute2
# Switch node for multinode networking setup
- name: switch
nodes:
- controller
# Peer nodes for multinode networking setup
- name: peers
nodes:
- compute1
- compute2
- nodeset:
name: openstack-three-node-centos-8
nodes:

View File

@ -18,7 +18,6 @@
- tobiko-devstack-functional-ubuntu-bionic
- tobiko-devstack-faults-centos-8
- tobiko-devstack-faults-ubuntu-bionic
- tobiko-tox-infrared-centos-7
- tobiko-tox-infrared-centos-8
- tobiko-tox-infrared-ubuntu-bionic
- tobiko-tripleo-functional