From 017e308b491747418018dd005749351294fa3ea2 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 21 Nov 2022 10:01:14 +0900 Subject: [PATCH] Remove logic for CentOS < 9 ... because RDO supports CentOS Stream 9 (aka CentOS 9) only since Zed. Change-Id: Ic8f5d35aca87a5df40864aeec3b04b5ea746188c --- manifests/neutron.pp | 8 +------- manifests/repos.pp | 26 ++++++++------------------ 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/manifests/neutron.pp b/manifests/neutron.pp index 2224d0a0d..60cb0b4c1 100644 --- a/manifests/neutron.pp +++ b/manifests/neutron.pp @@ -41,7 +41,7 @@ class openstack_integration::neutron ( Exec['update-ca-certificates'] ~> Service<| tag == 'neutron-service' |> } - if ($::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '8') >= 0) { + if $::operatingsystem == 'CentOS' { # os_neutron_dac_override should be on to start privsep-helper # See https://bugzilla.redhat.com/show_bug.cgi?id=1850973 selboolean { 'os_neutron_dac_override': @@ -70,12 +70,6 @@ class openstack_integration::neutron ( case $driver { 'openvswitch', 'ovn': { include vswitch::ovs - # In CentOS8 puppet-vswitch requires network-scripts package until it's ported to NM. - if ($::operatingsystem == 'CentOS') and (versioncmp($::operatingsystemmajrelease, '8') == 0) { - package { 'network-scripts-openvswitch': - ensure => 'latest' - } - } # Functional test for Open-vSwitch: # create dummy loopback interface to exercise adding a port to a bridge vs_bridge { 'br-ex': diff --git a/manifests/repos.pp b/manifests/repos.pp index 70545cfe8..6aa44b5ba 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -50,20 +50,12 @@ class openstack_integration::repos { $ceph_mirror = $ceph_mirror_fallback } 'RedHat': { - # Set specific variables for CentOS Stream 9 - if versioncmp($::os['release']['major'], '9') >= 0 { - $powertools_repo = 'crb' - } else { - $powertools_repo = 'powertools' - } + $powertools_repo = 'crb' if defined('$::centos_mirror_host') and $::centos_mirror_host != '' { $centos_mirror = $::centos_mirror_host } else { - $centos_mirror = $::os['release']['major'] ? { - '9' => 'http://mirror.stream.centos.org', - default => 'http://mirror.centos.org', - } + $centos_mirror = 'http://mirror.stream.centos.org' } if defined('$::delorean_repo_path') and $::delorean_repo_path != '' { @@ -90,16 +82,14 @@ class openstack_integration::repos { update_packages => true, } - $ceph_mirror_fallback = $::os['release']['major'] ? { - '9' => "${centos_mirror}/SIGs/${::os['release']['major']}-stream/storage/x86_64/ceph-${ceph_version_real}/", - default => "${centos_mirror}/centos/${::os['release']['major']}-stream/storage/x86_64/ceph-${ceph_version_real}/", - } + $ceph_mirror_fallback = "${centos_mirror}/SIGs/${::os['release']['major']}-stream/storage/x86_64/ceph-${ceph_version_real}/" if defined('$::ceph_mirror_host') and $::ceph_mirror_host != '' { - $ceph_mirror = pick($::ceph_mirror_host, $ceph_mirror_fallback) + $ceph_mirror = $::ceph_mirror_host } else { $ceph_mirror = $ceph_mirror_fallback } + # On CentOS, deploy Ceph using SIG repository and get rid of EPEL. # https://wiki.centos.org/SpecialInterestGroup/Storage/ if $::operatingsystem == 'CentOS' { @@ -111,10 +101,10 @@ class openstack_integration::repos { } # PowerTools is required on CentOS8 since Ussuri. - exec { 'enable-powertools': - command => "dnf config-manager --enable ${powertools_repo}", + exec { 'enable-crb': + command => 'dnf config-manager --enable crb', path => '/usr/bin/', - unless => "test 0 -ne $(dnf repolist --enabled ${powertools_repo} | wc -l)" + unless => 'test 0 -ne $(dnf repolist --enabled crb | wc -l)' } } default: {