From 4eac7fd2c1913ba329413bbd603cf76c1b3cfcb6 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Wed, 10 Mar 2021 12:04:34 +0000 Subject: [PATCH] Clean up code from unsupported operating systems Remove SUSE, Gentoo, and references to yum package manager. Change-Id: If591661b4145219f7837960f93bc9647b60d2a70 --- Vagrantfile | 25 +++++++------------------ bindep.txt | 7 ++----- common-tasks/test-set-nodepool-vars.yml | 1 - run_tests.sh | 8 +------- run_tests_common.sh | 19 ------------------- test-install-neutron.yml | 6 ------ test-install-nova.yml | 12 ------------ test-log-collect.sh | 21 +++------------------ test-prepare-host.yml | 8 +++----- zuul.d/playbooks/pre-gate-cleanup.yml | 11 +++-------- zuul.d/project-templates.yaml | 11 ----------- 11 files changed, 19 insertions(+), 110 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 7691c3cc..e02fdbb4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -35,28 +35,17 @@ Vagrant.configure(2) do |config| centos8.vm.box = "centos/8" end - config.vm.define "debian8" do |debian8| - debian8.vm.box = "debian/jessie64" - end - - config.vm.define "debian9" do |debian9| - debian9.vm.box = "debian/stretch64" - end - - config.vm.define "gentoo" do |gentoo| - gentoo.vm.box = "generic/gentoo" - end - - config.vm.define "opensuse150" do |leap150| - leap150.vm.box = "opensuse/openSUSE-15.0-x86_64" - end - - config.vm.define "opensuse151" do |leap151| - leap151.vm.box = "opensuse/openSUSE-15.1-x86_64" + config.vm.define "debian10" do |debian10| + debian10.vm.box = "debian/buster64" end config.vm.define "ubuntu1804" do |bionic| bionic.disksize.size = "40GB" bionic.vm.box = "ubuntu/bionic64" end + + config.vm.define "ubuntu2004" do |focal| + bionic.disksize.size = "40GB" + bionic.vm.box = "ubuntu/focal64" + end end diff --git a/bindep.txt b/bindep.txt index bb77692e..3db7d137 100644 --- a/bindep.txt +++ b/bindep.txt @@ -26,7 +26,7 @@ gcc # Base requirements for Ubuntu -git-core [platform:dpkg platform:suse] +git-core [platform:dpkg] libssl-dev [platform:dpkg] libffi-dev [platform:dpkg] python3 [platform:dpkg] @@ -35,15 +35,12 @@ python3-dev [platform:dpkg] # Base requirements for RPM distros gcc-c++ [platform:rpm] -git [platform:rpm !platform:suse] +git [platform:rpm] libffi-devel [platform:rpm] openssl-devel [platform:rpm] python3-dnf [platform:fedora] python3-devel [platform:rpm] -# Base requirements for Gentoo -git [platform:gentoo] - # For SELinux libselinux-python3 [platform:redhat] libsemanage-python3 [platform:redhat] diff --git a/common-tasks/test-set-nodepool-vars.yml b/common-tasks/test-set-nodepool-vars.yml index cdf3c075..429f5ee3 100644 --- a/common-tasks/test-set-nodepool-vars.yml +++ b/common-tasks/test-set-nodepool-vars.yml @@ -27,7 +27,6 @@ echo "lxc_reverse_proxy=${NODEPOOL_MIRROR_HOST}" echo "uca_apt_repo_url=${NODEPOOL_UCA_MIRROR}" echo "openstack_hosts_centos_mirror_url=${NODEPOOL_CENTOS_MIRROR}" - echo "opensuse_mirror=${NODEPOOL_OPENSUSE_MIRROR}" echo "pip_default_index=${NODEPOOL_PYPI_MIRROR}" echo "pip_wheel_mirror=${NODEPOOL_WHEEL_MIRROR}" echo "centos_epel_mirror=${NODEPOOL_EPEL_MIRROR}" diff --git a/run_tests.sh b/run_tests.sh index 93e91dde..221a098c 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -53,19 +53,13 @@ source /etc/os-release || source /usr/lib/os-release # Figure out the appropriate package install command case ${ID,,} in - *suse*) pkg_mgr_cmd="zypper -n in" ;; 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" ;; *) echo "unsupported distribution: ${ID,,}"; exit 1 ;; esac # Install git so that we can clone the tests repo if git is not available -case ${ID,,} in - gentoo) which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" dev-vcs/git ;; - *) which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git ;; -esac +which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git # Clone the tests repo for access to the common test script if [[ ! -d "${COMMON_TESTS_PATH}" ]]; then diff --git a/run_tests_common.sh b/run_tests_common.sh index 0f8badf2..f46839f4 100755 --- a/run_tests_common.sh +++ b/run_tests_common.sh @@ -44,12 +44,6 @@ BINDEP_FILE=${BINDEP_FILE:-bindep.txt} # Perform the initial distribution package install # to allow pip and bindep to work. case "${ID,,}" in - *suse*) - # Need to pull libffi and python-pyOpenSSL early - # because we install ndg-httpsclient from pip on Leap 42.1 - [[ "${VERSION}" == "42.1" ]] && extra_suse_deps="libffi-devel python-pyOpenSSL" - pkg_list="ca-certificates-mozilla python-devel python-xml lsb-release ${extra_suse_deps:-}" - ;; amzn|centos|rhel) pkg_list="python3-devel python3-virtualenv redhat-lsb-core" ;; @@ -60,10 +54,6 @@ case "${ID,,}" in pkg_list="python3-dev python3-pip virtualenv lsb-release curl" sudo apt-get update ;; - gentoo) - pkg_list="app-misc/ca-certificates sys-apps/lsb-release dev-python/pyopenssl" - sudo emerge-webrsync - ;; *) echo "Unsupported distribution: ${ID,,}" exit 1 @@ -82,9 +72,6 @@ sudo "${PIP_EXEC_PATH}" install 'bindep>=2.4.0' tox if [[ "${ID,,}" == "fedora" ]]; then sudo dnf -y install redhat-lsb-core yum-utils -# openSUSE 42.1 does not have python-ndg-httpsclient -elif [[ "${ID,,}" == *suse* ]] && [[ ${VERSION} == "42.1" ]]; then - sudo python -m pip install ndg-httpsclient fi # Get a list of packages to install with bindep. If packages need to be @@ -95,9 +82,6 @@ echo "Packages to install: ${BINDEP_PKGS}" # Install OS packages using bindep if [[ ${#BINDEP_PKGS} > 0 ]]; then case "${ID,,}" in - *suse*) - sudo zypper -n in ${BINDEP_PKGS} - ;; centos|fedora) sudo dnf install -y ${BINDEP_PKGS} ;; @@ -107,9 +91,6 @@ if [[ ${#BINDEP_PKGS} > 0 ]]; then apt-get -q --option "Dpkg::Options::=--force-confold" \ --assume-yes install ${BINDEP_PKGS} ;; - gentoo) - sudo emerge -q --jobs="$(nrpoc)" ${BINDEP_PKGS} - ;; esac fi diff --git a/test-install-neutron.yml b/test-install-neutron.yml index fb337da8..b67540cb 100644 --- a/test-install-neutron.yml +++ b/test-install-neutron.yml @@ -27,8 +27,6 @@ kernel_module_path: apt: "lib/modules" dnf: "usr/lib/modules" - yum: "usr/lib/modules" - zypper: "lib/modules" vars_files: - test-vars.yml tasks: @@ -64,10 +62,6 @@ - "libffi-dev" dnf: - "libffi-devel" - yum: - - "libffi-devel" - zypper: - - "libffi-devel" vars_files: - test-vars.yml tasks: diff --git a/test-install-nova.yml b/test-install-nova.yml index f3b32575..7b335ed6 100644 --- a/test-install-nova.yml +++ b/test-install-nova.yml @@ -34,18 +34,6 @@ - libffi-devel - pkgconfig - libvirt-devel - yum: - - libxml2-devel - - libxslt-devel - - libffi-devel - - pkgconfig - - libvirt-devel - zypper: - - libxml2-devel - - libxslt-devel - - libffi-devel - - pkg-config - - libvirt-devel vars_files: - test-vars.yml tasks: diff --git a/test-log-collect.sh b/test-log-collect.sh index ff768599..2c4cee31 100755 --- a/test-log-collect.sh +++ b/test-log-collect.sh @@ -100,30 +100,15 @@ function repo_information { [[ "${1}" != "host" ]] && lxc_cmd="lxc-attach --name ${1} --" || lxc_cmd="" echo "Collecting list of installed packages and enabled repositories for \"${1}\"" # Redhat package debugging - if eval sudo ${lxc_cmd} which yum &>/dev/null || eval sudo ${lxc_cmd} which dnf &>/dev/null; then - # Prefer dnf over yum for CentOS. - eval sudo ${lxc_cmd} which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum' - eval sudo ${lxc_cmd} $RHT_PKG_MGR repolist -v > "${WORKING_DIR}/logs/redhat-rpm-repolist-${1}.txt" || true - eval sudo ${lxc_cmd} $RHT_PKG_MGR list installed > "${WORKING_DIR}/logs/redhat-rpm-list-installed-${1}.txt" || true - - # SUSE package debugging - elif eval sudo ${lxc_cmd} which zypper &>/dev/null; then - eval sudo ${lxc_cmd} zypper lr -d > "${WORKING_DIR}/logs/suse-zypper-repolist-${1}.txt" || true - eval sudo ${lxc_cmd} zypper --disable-repositories pa -i > "${WORKING_DIR}/logs/suse-zypper-list-installed-${1}.txt" || true + if eval sudo ${lxc_cmd} which dnf &>/dev/null; then + eval sudo ${lxc_cmd} dnf repolist -v > "${WORKING_DIR}/logs/redhat-rpm-repolist-${1}.txt" || true + eval sudo ${lxc_cmd} dnf list installed > "${WORKING_DIR}/logs/redhat-rpm-list-installed-${1}.txt" || true # Ubuntu package debugging elif eval sudo ${lxc_cmd} which apt-get &> /dev/null; then eval sudo ${lxc_cmd} apt-cache policy | grep http | awk '{print $1" "$2" "$3}' | sort -u > "${WORKING_DIR}/logs/ubuntu-apt-repolist-${1}.txt" || true eval sudo ${lxc_cmd} apt list --installed > "${WORKING_DIR}/logs/ubuntu-apt-list-installed-${1}.txt" || true - - # Gentoo package debugging - elif eval sudo ${lxc_cmd} which emerge &> /dev/null; then - # list installed packages - eval sudo ${lxc_cmd} equery list "*" > "${WORKING_DIR}/logs/gentoo-portage-list-installed-${1}.txt" || true - # list only packages called for install (not dependancies) - eval sudo ${lxc_cmd} cat /var/lib/portage/world > "${WORKING_DIR}/logs/gentoo-portage-list-manual-installed-${1}.txt" || true fi - } function store_artifacts { diff --git a/test-prepare-host.yml b/test-prepare-host.yml index ac451197..28f74abb 100644 --- a/test-prepare-host.yml +++ b/test-prepare-host.yml @@ -55,12 +55,12 @@ - "91.189.91.21 images.linuxcontainers.org us.images.linuxcontainers.org" - "91.189.88.37 images.linuxcontainers.org uk.images.linuxcontainers.org" - # NOTE(mhayden): Using package_state=present on CentOS or openSUSE should allow for + # NOTE(mhayden): Using package_state=present on CentOS should allow for # more gate jobs to complete properly and expose more problems that can # be fixed (instead of timeouts). - - name: Use present for package_state on CentOS and openSUSE + - name: Use present for package_state on CentOS set_fact: - package_state: "{{ (ansible_pkg_mgr in ['dnf', 'yum', 'zypper']) | ternary('present', 'latest') }}" + package_state: "{{ (ansible_pkg_mgr == 'dnf') | ternary('present', 'latest') }}" - name: Setup clouds.yaml for the test user include_role: @@ -117,9 +117,7 @@ vars: iptool_path: debian: "/sbin/ip" - gentoo: "/bin/ip" redhat: "/usr/sbin/ip" - suse: "/bin/ip" vars_files: - test-vars.yml tasks: diff --git a/zuul.d/playbooks/pre-gate-cleanup.yml b/zuul.d/playbooks/pre-gate-cleanup.yml index 974ac8e6..09867106 100644 --- a/zuul.d/playbooks/pre-gate-cleanup.yml +++ b/zuul.d/playbooks/pre-gate-cleanup.yml @@ -26,15 +26,10 @@ when: - ansible_distribution_release in ['bionic', 'focal'] - - name: Remove package blacklist for yum/dnf + - name: Remove package blacklist for dnf lineinfile: - dest: "{{ (ansible_pkg_mgr == 'dnf') | ternary('/etc/dnf/dnf.conf', '/etc/yum.conf') }}" + dest: '/etc/dnf/dnf.conf' regexp: "^exclude=" state: absent - when: ansible_pkg_mgr in ['dnf', 'yum'] + when: ansible_pkg_mgr == 'dnf' - - name: Remove package blacklist for zypper - file: - path: /etc/zypp/locks - state: absent - when: ansible_pkg_mgr == 'zypper' diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml index 9b4a93c8..57db682b 100644 --- a/zuul.d/project-templates.yaml +++ b/zuul.d/project-templates.yaml @@ -25,7 +25,6 @@ experimental: jobs: - openstack-ansible-integrated-deploy-aio - - openstack-ansible-functional-gentoo-17-0-systemd - project-template: name: openstack-ansible-upgrade @@ -35,9 +34,6 @@ gate: jobs: - openstack-ansible-upgrade-ubuntu-bionic - experimental: - jobs: - - openstack-ansible-upgrade-gentoo-17-0-systemd - project-template: name: openstack-ansible-role-distro_install-jobs @@ -47,10 +43,3 @@ gate: jobs: - openstack-ansible-functional-distro_install-centos-8 - experimental: - jobs: - # NOTE(hwoarang) SUSE and Ubuntu distro jobs remain non-voting - # on master branches. See - # http://eavesdrop.openstack.org/meetings/openstack_ansible_meeting/2018/openstack_ansible_meeting.2018-10-23-16.01.log.html#l-188 - - openstack-ansible-functional-distro_install-gentoo-17-0-systemd - - openstack-ansible-functional-distro_install-ubuntu-bionic