Remove Centos-7 support

Ussuri is the last release that openstack-ansible will support Centos-7.
Remove this for the Victoria release.

Change-Id: Ief6cbb2d02bfdc4e6c3c0fbb0cc9ab5a3eab98c3
This commit is contained in:
Jonathan Rosser 2020-07-21 09:28:40 +01:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent 092a6cc664
commit a05e5de565
17 changed files with 30 additions and 193 deletions

20
Vagrantfile vendored
View File

@ -42,26 +42,6 @@ Vagrant.configure(2) do |config|
SHELL
end
config.vm.define "centos7" do |centos7|
centos7.vm.box = "centos/7"
centos7.disksize.size = disk_size
# The CentOS build does not have growroot, so we
# have to do it ourselves.
config.vm.provision "shell",
privileged: true,
inline: <<-SHELL
cd /vagrant
PART_START=$(parted /dev/sda --script unit MB print | awk '/^ 3 / {print $3}')
parted /dev/sda --script unit MB mkpart primary ${PART_START} 100%
parted /dev/sda --script set 4 lvm on
pvcreate /dev/sda4
vgextend VolGroup00 /dev/sda4
lvextend -l +100%FREE /dev/mapper/VolGroup00-LogVol00
xfs_growfs /dev/mapper/VolGroup00-LogVol00
./scripts/gate-check-commit.sh
SHELL
end
config.vm.define "opensuse423" do |leap423|
leap423.disksize.size = disk_size
leap423.vm.box = "opensuse/openSUSE-42.3-x86_64"

View File

@ -39,9 +39,9 @@ openstack_service_bind_address: "{{ management_address }}"
# Set the package install state for distribution packages
# Options are 'present' and 'latest'.
# NOTE(mhayden): Allowing CentOS 7 and openSUSE to use package_state=present should give
# NOTE(mhayden): Allowing CentOS and openSUSE to use package_state=present should give
# gate jobs a better chance to finish and expose more issues to fix.
package_state: "{{ (ansible_pkg_mgr in ['dnf', 'yum', 'zypper']) | ternary('present', 'latest') }}"
package_state: "{{ (ansible_pkg_mgr in ['dnf', 'zypper']) | ternary('present', 'latest') }}"
# Set "/var/log" to be a bind mount to the physical host.
default_bind_mount_logs: true

View File

@ -44,4 +44,4 @@ nfs_ganesha_stable: "{{ (ansible_distribution_release not in ['bionic', 'focal']
# ceph-ansible's default enabling of ntpd conflicts with the OSA defaults
ntp_service_enabled: False
dashboard_enabled: "{{ not (ansible_os_family | lower == 'redhat' and ansible_distribution_major_version is version('7', '=')) }}"
dashboard_enabled: True

View File

@ -23,7 +23,7 @@ galera_container_bind_mounts:
- bind_dir_path: "/var/lib/mysql"
mount_path: "/openstack/{{ inventory_hostname }}"
# Disable PrivateDevices for MariaDB on CentOS 7
# Disable PrivateDevices for MariaDB on CentOS
# See https://bugs.launchpad.net/openstack-ansible/+bug/1697531 for details.
galera_disable_privatedevices: "{{ not is_metal }}"

View File

@ -21,7 +21,7 @@ security_package_state: "{{ package_state }}"
# Use the RHEL 7 STIG content from the ansible-hardening role
stig_version: rhel7
# Temporarily avoid putting SELinux into enforcing mode on CentOS 7 until some
# Temporarily avoid putting SELinux into enforcing mode on CentOS until some
# additional policy is written. See LP Bug 1657517 for more details.
security_rhel7_enable_linux_security_module: "{{ ansible_os_family == 'RedHat' | ternary(false, true) }}"

View File

@ -18,6 +18,6 @@ memcached_listen: "{{ ansible_host }}"
# Ensure that the package state matches the global setting
memcached_package_state: "{{ package_state }}"
# Disable PrivateDevices for MemcacheD on CentOS 7
# Disable PrivateDevices for MemcacheD on CentOS
# See https://bugs.launchpad.net/openstack-ansible/+bug/1697531 for details.
memcached_disable_privatedevices: "{{ not is_metal }}"

View File

@ -31,6 +31,7 @@ utility_distro_packages:
- git
- bash-completion
# Distribution packages needed for the utility pip package wheel build
_utility_devel_distro_packages_debian:
- gcc
- python3-dev
@ -38,30 +39,17 @@ _utility_devel_distro_packages_debian:
_utility_devel_distro_packages_redhat:
- gcc
- libselinux-python3
- "{{ ansible_distribution_major_version is version('8', '<') | ternary('python-devel', 'python36-devel') }}"
- python36-devel
# Distribution packages needed for the utility pip package wheel build
utility_devel_distro_packages: "{{ (ansible_os_family == 'RedHat') | ternary(_utility_devel_distro_packages_redhat, _utility_devel_distro_packages_debian) }}"
# Packages installed into the utility container for distro installs
# NOTE(jrosser) this can be simplified when all supported
# distros use python3
utility_distro_openstack_clients_python_version: "{{ (ansible_distribution == 'CentOS' and ansible_distribution_major_version is version('8', '<')) | ternary('2', '3') }}"
_utility_distro_openstack_clients_packages:
2:
- python-keystoneclient
- python-neutronclient
- python-novaclient
- python-cinderclient
- python-openstackclient
3:
# Client packages required for distro installs
utility_distro_openstack_clients_packages:
- python3-keystoneclient
- python3-neutronclient
- python3-novaclient
- python3-cinderclient
- python3-openstackclient
- "{{ (ansible_os_family | lower == 'redhat') | ternary('python3-PyMySQL', 'python3-pymysql') }}"
# Python packages to be installed into the utility container
utility_pip_packages:

View File

@ -41,63 +41,7 @@
when:
- ansible_pkg_mgr == 'apt'
# We need to have PyYAML for ceph-ansible roles
- block:
- name: Install python3-yaml
package:
name: "{{ (ansible_os_family | lower == 'debian') | ternary('python3-yaml', 'python3-pyyaml') }}"
state: present
# Rescue is mainly for CentOS 7
rescue:
- name: Download EPEL gpg keys
get_url:
url: "{{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7') }}"
dest: /etc/pki/rpm-gpg
register: _get_yum_keys
until: _get_yum_keys is success
retries: 5
delay: 2
when:
- ansible_os_family | lower == 'redhat'
- ansible_distribution_major_version is version('7', '=')
- name: Install EPEL gpg keys
rpm_key:
key: "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7"
state: present
when:
- ansible_os_family | lower == 'redhat'
- ansible_distribution_major_version is version('7', '=')
- name: Install the EPEL repository
yum_repository:
name: epel-ceph
baseurl: "{{ centos_epel_mirror | default('http://download.fedoraproject.org/pub/epel') ~ '/'
~ ansible_distribution_major_version ~ '/'
~ ansible_architecture }}"
description: 'Extra Packages for Enterprise Linux 7 - $basearch'
gpgcheck: yes
enabled: yes
state: present
includepkgs: 'python2-pip'
register: install_epel_repo
until: install_epel_repo is success
retries: 5
delay: 2
when:
- ansible_os_family | lower == 'redhat'
- ansible_distribution_major_version is version('7', '=')
# Installing both pip's not to fail
- name: Installing pip
package:
name:
- "{{ (ansible_os_family | lower == 'redhat' and ansible_distribution_major_version is version('8', '<')) | ternary('python2-pip', 'python-pip') }}"
- python3-pip
state: present
- name: Install PyYAML
pip:
name: PyYAML
- name: Install python3-yaml
package:
name: "{{ (ansible_os_family | lower == 'debian') | ternary('python3-yaml', 'python3-pyyaml') }}"
state: present

View File

@ -53,16 +53,13 @@
- name: Check for a supported Operating System
assert:
that:
- (ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch') or
(ansible_distribution == 'Debian' and ansible_distribution_release == 'buster') or
- (ansible_distribution == 'Debian' and ansible_distribution_release == 'buster') or
(ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'bionic') or
(ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'focal') or
(ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') or
(ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8') or
(ansible_os_family == 'Suse' and ansible_distribution_major_version in ['15', '42'])
(ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8')
msg: >
The only supported platforms for this release are Debian Stretch or Buster,
Ubuntu 18.04 LTS (Bionic), CentOS 7 (WIP) and openSUSE Leap 42.X and openSUSE Leap 15.X
The only supported platforms for this release are Debian 10 (Buster),
Ubuntu 18.04 LTS (Bionic), Ubuntu 20.04 LTS (Focal) and CentOS 8
roles:
- role: "openstack_hosts"
vars_files:

View File

@ -73,8 +73,7 @@
post_tasks:
- name: Add OpenStack client to distro packages
set_fact:
utility_distro_packages: "{{ (utility_distro_packages | default([])) +
_utility_distro_openstack_clients_packages[utility_distro_openstack_clients_python_version|int] }}"
utility_distro_packages: "{{ (utility_distro_packages | default([])) + utility_distro_openstack_clients_packages }}"
when: install_method == "distro"
- name: Add EPEL repsitory

View File

@ -51,13 +51,10 @@ fi
# Source distribution information
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
case ${ID,,} 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" ;;
# Gentoo needs to have version set since it's rolling
gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;;

View File

@ -64,18 +64,14 @@ ssh_key_create
# Determine the distribution which the host is running on
determine_distro
# Prefer dnf over yum for CentOS.
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
# Install the base packages
case ${DISTRO_ID} in
centos|rhel)
$RHT_PKG_MGR -y install \
git curl autoconf gcc gcc-c++ nc rsync \
dnf -y install \
git curl autoconf gcc gcc-c++ nc \
python3 python3-devel libselinux-python3 \
openssl-devel libffi-devel \
$(if [[ ${VERSION_ID} == '7' ]]; then echo "python-virtualenv"; else echo "python3-virtualenv"; fi)
python3-virtualenv
;;
ubuntu|debian)
# NOTE(mgariepy) remove this on ansible 2.10 if debian is in the config/base.yml file

View File

@ -57,7 +57,7 @@ fi
# Build ansible-runtime venv
function build_ansible_runtime_venv {
# All distros have a python-virtualenv > 13.
# - Centos 7 has 15.1, which holds pip 9.0.1, setuptools 28.8, wheel 0.29
# - Centos 8 has 15.1, which holds pip 9.0.1, setuptools 28.8, wheel 0.29
# See also: http://mirror.centos.org/centos/7/os/x86_64/Packages/
# - openSUSE 42.3 has 13.1.2, which holds pip 7.1.2, setuptools 18.2, wheel 0.24.
# See also: https://build.opensuse.org/package/show/openSUSE%3ALeap%3A42.3/python-virtualenv
@ -220,9 +220,7 @@ function run_dstat {
if [ "$GATE_EXIT_RUN_DSTAT" == true ]; then
case ${DISTRO_ID} in
centos|rhel)
# Prefer dnf over yum for CentOS.
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
$RHT_PKG_MGR -y install dstat
dnf -y install dstat
;;
ubuntu)
apt-get update
@ -271,9 +269,7 @@ function log_instance_info {
DEBIAN_FRONTEND=noninteractive apt-get -y install iproute2 net-tools
;;
centos|rhel)
# Prefer dnf over yum for CentOS.
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
$RHT_PKG_MGR -y install iproute
dnf -y install iproute
;;
esac
set +x

View File

@ -20,12 +20,11 @@
(ansible_distribution == 'Debian' and ansible_distribution_release == 'buster') or
(ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'bionic') or
(ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'focal') or
(ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7') or
(ansible_os_family == 'RedHat' and ansible_distribution_major_version == '8') or
(ansible_os_family == 'Suse' and ansible_distribution_major_version in ['42', '15'])
msg: >-
The only supported platforms for this release are Debian Stretch, Ubuntu 18.04 LTS (Bionic),
Centos 7, openSUSE Leap 42.X and openSUSE Leap 15.X
Centos 8, openSUSE Leap 42.X and openSUSE Leap 15.X
when: (check_operating_system | default(True))| bool
tags:
- check-operating-system

View File

@ -102,9 +102,9 @@
- "91.189.91.21 images.linuxcontainers.org us.images.linuxcontainers.org"
- "91.189.88.37 images.linuxcontainers.org uk.images.linuxcontainers.org"
# NOTE(mhayden): The OpenStack CI images for CentOS 7 recently set SELinux to
# NOTE(mhayden): The OpenStack CI images for CentOS recently set SELinux to
# Enforcing mode by default. While I am normally a supporter of this change,
# the SELinux policy work for CentOS 7 is not done yet.
# the SELinux policy work for CentOS is not done yet.
- name: Set SELinux to permissive mode in OpenStack-CI
selinux:
policy: targeted

View File

@ -19,7 +19,7 @@ magnum_glance_images:
image_format: bare
public: true
file: https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/31.20200210.3.0/x86_64/fedora-coreos-31.20200210.3.0-openstack.x86_64.qcow2.xz
distro: "fedora-{{ (ansible_os_family | lower == 'redhat' and ansible_distribution_major_version is version('8', '<') and bootstrap_host_install_method == 'distro') | ternary('atomic', 'coreos') }}"
distro: "coreos"
checksum: "sha256:9a5252e24b82a5edb1ce75b05653f59895685b0f1028112462e908a12deae518"
magnum_cluster_templates:

View File

@ -337,65 +337,6 @@
parent: openstack-ansible-deploy-aio
nodeset: ubuntu-bionic
# centos
- job:
name: openstack-ansible-deploy-aio_lxc-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-deploy-aio_distro_lxc-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-deploy-aio_ceph-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-deploy-aio_distro_ceph-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-upgrade-aio_lxc-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
timeout: 10800
- job:
name: openstack-ansible-deploy-aio_metal-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-deploy-aio_telemetry_metal-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-deploy-aio_distro_metal-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-deploy-aio_nspawn-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
- job:
name: openstack-ansible-upgrade-aio_metal-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
timeout: 10800
- job:
name: openstack-ansible-upgrade-aio_ceph-centos-7
parent: openstack-ansible-deploy-aio
nodeset: centos-7
timeout: 10800
# centos 8
- job:
name: openstack-ansible-deploy-aio_lxc-centos-8