Merge "Remove Centos-7 support"

This commit is contained in:
Zuul 2020-09-24 16:42:46 +00:00 committed by Gerrit Code Review
commit a06625642a
7 changed files with 16 additions and 69 deletions

4
Vagrantfile vendored
View File

@ -31,8 +31,8 @@ Vagrant.configure(2) do |config|
./run_tests.sh ./run_tests.sh
SHELL SHELL
config.vm.define "centos7" do |centos7| config.vm.define "centos8" do |centos8|
centos7.vm.box = "centos/7" centos8.vm.box = "centos/8"
end end
config.vm.define "debian8" do |debian8| config.vm.define "debian8" do |debian8|

View File

@ -40,23 +40,7 @@
echo "nspawn_hosts_container_image_repo=${NODEPOOL_LXC_IMAGE_PROXY}" echo "nspawn_hosts_container_image_repo=${NODEPOOL_LXC_IMAGE_PROXY}"
source /etc/os-release source /etc/os-release
if [[ $ID == 'centos' && VERSION_ID == '7' ]]; then if [[ $ID == 'centos' && VERSION_ID == '8' ]]; then
echo "lxc_centos_package_baseurl=http://${NODEPOOL_MIRROR_HOST}:8080/copr-lxc2/epel-7-x86_64/"
echo "lxc_centos_package_key=http://${NODEPOOL_MIRROR_HOST}:8080/copr-lxc2/pubkey.gpg"
# NOTE(mnaser): We need to make sure we pull the latest RDO mirror
# which is hashed to avoid cache going stale during CI.
# TODO(mnaser): Share this with Puppet
# https://github.com/openstack/puppet-openstack-integration/blob/master/configure_facts.sh#L66-L71
export DLRN_BASE=${DLRN_BASE:-centos7-master/puppet-passed-ci}
rdo_dlrn=`curl --silent ${NODEPOOL_RDO_PROXY}/${DLRN_BASE}/delorean.repo | grep baseurl | cut -d= -f2`
if [[ -z "$rdo_dlrn" ]]; then
echo "Failed to parse dlrn hash"
exit 1
fi
RDO_MIRROR_HOST=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
echo "openstack_hosts_rdo_repo_url=${RDO_MIRROR_HOST}"s
elif [[ $ID == 'centos' && VERSION_ID == '8' ]]; then
echo "openstack_hosts_rdo_mirror_url=${NODEPOOL_RDO_PROXY}" echo "openstack_hosts_rdo_mirror_url=${NODEPOOL_RDO_PROXY}"
fi fi
args: args:

View File

@ -51,13 +51,10 @@ fi
# Source distribution information # Source distribution information
source /etc/os-release || source /usr/lib/os-release source /etc/os-release || source /usr/lib/os-release
# Prefer dnf over yum for CentOS.
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
# Figure out the appropriate package install command # Figure out the appropriate package install command
case ${ID,,} in case ${ID,,} in
*suse*) pkg_mgr_cmd="zypper -n in" ;; *suse*) pkg_mgr_cmd="zypper -n in" ;;
centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;; centos|rhel|fedora) pkg_mgr_cmd="dnf install -y" ;;
ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
# Gentoo needs to have version set since it's rolling # Gentoo needs to have version set since it's rolling
gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;; gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;;

View File

@ -51,11 +51,7 @@ case "${ID,,}" in
pkg_list="ca-certificates-mozilla python-devel python-xml lsb-release ${extra_suse_deps:-}" pkg_list="ca-certificates-mozilla python-devel python-xml lsb-release ${extra_suse_deps:-}"
;; ;;
amzn|centos|rhel) amzn|centos|rhel)
# NOTE(jrosser) on centos7 we ensure that the distro version of virtualenv is present to avoid pkg_list="python3-devel redhat-lsb-core"
# tox later installing virtualenv as a dependancy with pip, and breaking later tests with
# openstack_hosts which correctly install the python-virtualenv distro package
[[ "${VERSION_ID}" == "7" ]] && extra_redhat_deps="python-virtualenv"
pkg_list="python3-devel redhat-lsb-core yum-utils ${extra_redhat_deps:-}"
;; ;;
fedora) fedora)
pkg_list="python3-devel redhat-lsb-core redhat-rpm-config yum-utils" pkg_list="python3-devel redhat-lsb-core redhat-rpm-config yum-utils"
@ -82,9 +78,7 @@ if ! which pip3 &>/dev/null; then
fi fi
# Install bindep and tox # Install bindep and tox
if [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "7" ]]; then if [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "8" ]]; then
sudo pip3 install 'bindep>=2.4.0' 'tox<=3.14.0'
elif [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "8" ]]; then
sudo alternatives --set python /usr/bin/python3 sudo alternatives --set python /usr/bin/python3
sudo pip3 install 'bindep>=2.4.0' tox sudo pip3 install 'bindep>=2.4.0' tox
else else
@ -110,7 +104,7 @@ if [[ ${#BINDEP_PKGS} > 0 ]]; then
sudo zypper -n in ${BINDEP_PKGS} sudo zypper -n in ${BINDEP_PKGS}
;; ;;
centos|fedora) centos|fedora)
sudo "${RHT_PKG_MGR}" install -y ${BINDEP_PKGS} sudo dnf install -y ${BINDEP_PKGS}
;; ;;
ubuntu|debian) ubuntu|debian)
sudo apt-get update sudo apt-get update

View File

@ -84,26 +84,7 @@ function execute_ansible_playbook {
} }
## Main ---------------------------------------------------------------------- ## Main ----------------------------------------------------------------------
# NOTE(mhayden): CentOS images in the gate have several slow mirrors enabled
# by default. This step ensures that only the base and updates
# repositories are enabled.
#
# NOTE(logan): Due to the way Ansible's yum module works, we should leave all
# except these two repos globally disabled. See the link below for more info:
# https://github.com/ansible/ansible/issues/26995#issuecomment-392288700
#
# Rather than enabling repos globally, we can use the yum repository module to
# selectively pull in packages from other repos (ie. extras, EPEL, RDO, etc.)
# on an as-needed basis in the roles where they are required using includepkgs.
# See the example here:
# https://opendev.org/openstack/openstack-ansible-lxc_hosts/src/commit/a6cae27fa3e6d03b48ba34468df4af90c77f4880/tasks/lxc_install_yum.yml#L46-L58
source /etc/os-release source /etc/os-release
if [[ -x /usr/bin/yum-config-manager ]] && [[ -e /etc/centos-release ]] && [[ ${VERSION_ID} == '7' ]] ; then
sudo yum-config-manager --disable \* > /dev/null
sudo yum-config-manager --enable base > /dev/null
sudo yum-config-manager --enable updates > /dev/null
fi
# Check if SELinux is present and which mode is currently set. # Check if SELinux is present and which mode is currently set.
if [[ -x /usr/sbin/getenforce ]]; then if [[ -x /usr/sbin/getenforce ]]; then
@ -113,10 +94,10 @@ else
fi fi
echo "Current SELinux status: ${SELINUX_STATUS}" echo "Current SELinux status: ${SELINUX_STATUS}"
# NOTE(mhayden): SELinux policies for CentOS 7 are still incomplete. Ensure # NOTE(mhayden): SELinux policies for CentOS are still incomplete. Ensure
# SELinux is not in enforcing mode during tests. # SELinux is not in enforcing mode during tests.
if [ "${SELINUX_STATUS}" == "Enforcing" ]; then if [ "${SELINUX_STATUS}" == "Enforcing" ]; then
echo "NOTE: CentOS 7 SELinux policies are incomplete." echo "NOTE: CentOS SELinux policies are incomplete."
echo "Switching SELinux mode from Enforcing to Permissive." echo "Switching SELinux mode from Enforcing to Permissive."
sudo /usr/sbin/setenforce 0 sudo /usr/sbin/setenforce 0
fi fi

View File

@ -155,25 +155,20 @@
vars: vars:
tox_env: distro_install tox_env: distro_install
- job:
name: openstack-ansible-functional-centos-7
parent: openstack-ansible-functional
nodeset: centos-7
- job: - job:
name: openstack-ansible-functional-centos-8 name: openstack-ansible-functional-centos-8
parent: openstack-ansible-functional parent: openstack-ansible-functional
nodeset: centos-8 nodeset: centos-8
- job: - job:
name: openstack-ansible-upgrade-centos-7 name: openstack-ansible-upgrade-centos-8
parent: openstack-ansible-upgrade parent: openstack-ansible-upgrade
nodeset: centos-7 nodeset: centos-8
- job: - job:
name: openstack-ansible-functional-distro_install-centos-7 name: openstack-ansible-functional-distro_install-centos-8
parent: openstack-ansible-functional parent: openstack-ansible-functional
nodeset: centos-7 nodeset: centos-8
vars: vars:
tox_env: distro_install tox_env: distro_install

View File

@ -14,7 +14,6 @@
jobs: jobs:
- openstack-ansible-linters - openstack-ansible-linters
- openstack-ansible-functional-debian-buster - openstack-ansible-functional-debian-buster
- openstack-ansible-functional-centos-7
- openstack-ansible-functional-centos-8 - openstack-ansible-functional-centos-8
- openstack-ansible-functional-ubuntu-bionic - openstack-ansible-functional-ubuntu-bionic
- openstack-ansible-functional-ubuntu-focal - openstack-ansible-functional-ubuntu-focal
@ -22,7 +21,6 @@
jobs: jobs:
- openstack-ansible-linters - openstack-ansible-linters
- openstack-ansible-functional-debian-buster - openstack-ansible-functional-debian-buster
- openstack-ansible-functional-centos-7
- openstack-ansible-functional-ubuntu-bionic - openstack-ansible-functional-ubuntu-bionic
experimental: experimental:
jobs: jobs:
@ -33,12 +31,10 @@
name: openstack-ansible-upgrade name: openstack-ansible-upgrade
check: check:
jobs: jobs:
- openstack-ansible-upgrade-centos-7
- openstack-ansible-upgrade-ubuntu-bionic - openstack-ansible-upgrade-ubuntu-bionic
gate: gate:
jobs: jobs:
- openstack-ansible-upgrade-centos-7 - openstack-ansible-upgrade-ubuntu-bionic
openstack-ansible-upgrade-ubuntu-bionic
experimental: experimental:
jobs: jobs:
- openstack-ansible-upgrade-gentoo-17-0-systemd - openstack-ansible-upgrade-gentoo-17-0-systemd
@ -47,10 +43,10 @@
name: openstack-ansible-role-distro_install-jobs name: openstack-ansible-role-distro_install-jobs
check: check:
jobs: jobs:
- openstack-ansible-functional-distro_install-centos-7 - openstack-ansible-functional-distro_install-centos-8
gate: gate:
jobs: jobs:
- openstack-ansible-functional-distro_install-centos-7 - openstack-ansible-functional-distro_install-centos-8
experimental: experimental:
jobs: jobs:
# NOTE(hwoarang) SUSE and Ubuntu distro jobs remain non-voting # NOTE(hwoarang) SUSE and Ubuntu distro jobs remain non-voting