Remove logic for CentOS < 9

... because RDO supports CentOS Stream 9 (aka CentOS 9) only since Zed.

Change-Id: Ic8f5d35aca87a5df40864aeec3b04b5ea746188c
This commit is contained in:
Takashi Kajinami 2022-11-21 10:01:14 +09:00
parent c0204da684
commit 017e308b49
2 changed files with 9 additions and 25 deletions

View File

@ -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':

View File

@ -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: {