Merge "Remove centos7 job, python2 support" into stable/wallaby

This commit is contained in:
Zuul 2022-02-23 22:02:48 +00:00 committed by Gerrit Code Review
commit 48bf92c556
8 changed files with 19 additions and 57 deletions

View File

@ -3,7 +3,7 @@ dhcp-all-interfaces
ibft-interfaces ibft-interfaces
install-static install-static
package-installs package-installs
pip-and-virtualenv ensure-venv
pkg-map pkg-map
source-repositories source-repositories
svc-map svc-map

View File

@ -1,5 +1,5 @@
# TODO(dtantsur): verify if opensuse can be added here # TODO(dtantsur): verify if opensuse can be added here
if [[ $DISTRO_NAME =~ (fedora|centos|centos7|rhel|rhel7) ]]; then if [[ $DISTRO_NAME =~ (fedora|centos|rhel) ]]; then
export IPA_DISTRO_FAMILY=rh export IPA_DISTRO_FAMILY=rh
else else
export IPA_DISTRO_FAMILY=other export IPA_DISTRO_FAMILY=other

View File

@ -13,33 +13,11 @@ IPADIR=/tmp/ironic-python-agent
IRLIBDIR=/tmp/ironic-lib IRLIBDIR=/tmp/ironic-lib
UPPER_CONSTRAINTS=/tmp/requirements/upper-constraints.txt UPPER_CONSTRAINTS=/tmp/requirements/upper-constraints.txt
VENVDIR=/opt/ironic-python-agent VENVDIR=/opt/ironic-python-agent
# 19.1.1 is required for cryptography.
REQUIRED_PIP_STR="19.1.1"
REQUIRED_PIP_TUPLE="(19, 1, 1)"
IPA_PYTHON_VERSION=$DIB_PYTHON_VERSION
IPA_PYTHON="$DIB_PYTHON"
case "$DISTRO_NAME" in
centos7|rhel7)
# NOTE(dtantsur): C.UTF-8 doesn't seem to exist in CentOS 7
export LC_ALL=en_US.UTF-8
if grep -q 'Python :: 3 :: Only' $IPADIR/setup.cfg; then
echo "WARNING: using Python 3 on CentOS 7, this is not recommended"
${YUM:-yum} install -y python3 python3-devel
IPA_PYTHON=python3
IPA_PYTHON_VERSION=3
fi
;;
esac
# create the virtual environment using the default python # create the virtual environment using the default python
if [ $IPA_PYTHON_VERSION == 3 ]; then python3 -m venv $VENVDIR
$IPA_PYTHON -m venv $VENVDIR REQUIRED_PIP_STR="21.3.1"
else REQUIRED_PIP_TUPLE="(21, 3, 1)"
$IPA_PYTHON -m virtualenv $VENVDIR
fi
HAS_PIP=$($VENVDIR/bin/python -c \ HAS_PIP=$($VENVDIR/bin/python -c \
"import pip; print(tuple(map(int, pip.__version__.split('.'))) >= $REQUIRED_PIP_TUPLE)") "import pip; print(tuple(map(int, pip.__version__.split('.'))) >= $REQUIRED_PIP_TUPLE)")
@ -52,7 +30,7 @@ fi
# NOTE(rpittau): if we want to keep compatibility with Python 2.x, we need to # NOTE(rpittau): if we want to keep compatibility with Python 2.x, we need to
# upgrade setuptools in the virtualenv as the default installed has issues # upgrade setuptools in the virtualenv as the default installed has issues
# when parsing requirements. # when parsing requirements.
if [ "$DISTRO_NAME" == "opensuse" ] || [ $IPA_PYTHON_VERSION == 2 ]; then if [ "$DISTRO_NAME" == "opensuse" ]; then
$VENVDIR/bin/pip install -U setuptools $VENVDIR/bin/pip install -U setuptools
fi fi

View File

@ -2,15 +2,11 @@
"release": { "release": {
"rhel": { "rhel": {
"7": { "7": {
"python": "python",
"python-dev": "python-devel",
"tgt": "scsi-target-utils" "tgt": "scsi-target-utils"
} }
}, },
"centos": { "centos": {
"7": { "7": {
"python": "python",
"python-dev": "python-devel",
"tgt": "scsi-target-utils" "tgt": "scsi-target-utils"
} }
} }

View File

@ -21,7 +21,7 @@ done
# TODO(dtantsur): implement the same for debian-based systems # TODO(dtantsur): implement the same for debian-based systems
case "$DISTRO_NAME" in case "$DISTRO_NAME" in
fedora|centos|centos7|rhel|rhel7) fedora|centos|rhel)
${YUM:-yum} remove -y postfix gcc make ${YUM:-yum} remove -y postfix gcc make
${YUM:-yum} clean all ${YUM:-yum} clean all
# Rebuilding the rpm database after removing packages will reduce # Rebuilding the rpm database after removing packages will reduce

View File

@ -0,0 +1,10 @@
---
upgrade:
- |
Support for python2 in ironic-python-agent was dropped in the Ussuri release
however it was still possible to build (non-functional) python2 images for
CentOS 7. This python2 support is now dropped from the image build also. As
part of this change, the `pip-and-virtualenv` element is not longer a
dependency, so any custom elements which depend on this element will need to
either include it explicitly or migrate to the recommended `ensure-venv`
element.

View File

@ -19,16 +19,6 @@
vars: vars:
image_type: 'tinyipa' image_type: 'tinyipa'
- job:
name: ironic-python-agent-build-image-dib-centos7
parent: ironic-python-agent-build-image-base
override-branch: stable/train
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'centos7'
- job: - job:
name: ironic-python-agent-build-image-dib-centos8 name: ironic-python-agent-build-image-dib-centos8
parent: ironic-python-agent-build-image-base parent: ironic-python-agent-build-image-base
@ -77,16 +67,6 @@
vars: vars:
image_type: 'tinyipa' image_type: 'tinyipa'
- job:
name: ironic-python-agent-check-image-dib-centos7
parent: ironic-python-agent-check-image-base
override-branch: stable/train
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'centos7'
- job: - job:
name: ironic-python-agent-check-image-dib-centos7-python3 name: ironic-python-agent-check-image-dib-centos7-python3
parent: ironic-python-agent-check-image-base parent: ironic-python-agent-check-image-base

View File

@ -12,12 +12,10 @@
- ironic-python-agent-check-image-tinyipa - ironic-python-agent-check-image-tinyipa
- ironic-python-agent-check-image-dib-centos8 - ironic-python-agent-check-image-dib-centos8
- ironic-python-agent-check-image-dib-centos8-extra - ironic-python-agent-check-image-dib-centos8-extra
- ironic-python-agent-check-image-dib-centos7 - ironic-python-agent-check-image-dib-centos7-python3
- ironic-python-agent-check-image-dib-debian - ironic-python-agent-check-image-dib-debian
- ironic-python-agent-check-image-dib-debian-extra - ironic-python-agent-check-image-dib-debian-extra
# Non-voting jobs # Non-voting jobs
- ironic-python-agent-check-image-dib-centos7-python3:
voting: false
- ironic-python-agent-check-image-dib-fedora: - ironic-python-agent-check-image-dib-fedora:
voting: false voting: false
- ironic-python-agent-check-image-dib-ubuntu: - ironic-python-agent-check-image-dib-ubuntu:
@ -43,7 +41,7 @@
- ironic-python-agent-check-image-tinyipa - ironic-python-agent-check-image-tinyipa
- ironic-python-agent-check-image-dib-centos8 - ironic-python-agent-check-image-dib-centos8
- ironic-python-agent-check-image-dib-centos8-extra - ironic-python-agent-check-image-dib-centos8-extra
- ironic-python-agent-check-image-dib-centos7 - ironic-python-agent-check-image-dib-centos7-python3
- ironic-python-agent-check-image-dib-debian - ironic-python-agent-check-image-dib-debian
- ironic-python-agent-check-image-dib-debian-extra - ironic-python-agent-check-image-dib-debian-extra
post: post: