Remove support for CentOS 8 (non-stream)
CentOS 8 reached its EOL a while ago. Because we already removed support for CentOS 7, we no longer support any non-stream CentOS versions. This deprecates the stream parameter and makes the stream repository used always. Change-Id: Iba3c8aea2f6dd8b9cca17ed1468a43d6c7d39b53
This commit is contained in:
parent
5ebde1e6b1
commit
a3283bf79f
@ -53,12 +53,14 @@
|
||||
# https://wiki.centos.org/SpecialInterestGroup/Storage/
|
||||
# Optional. Defaults to False in ceph::params.
|
||||
#
|
||||
# [*stream*] Whether this is CentOS Stream or not. This parameter is used in CentOS only.
|
||||
# Optional. Defaults to False.
|
||||
#
|
||||
# [*ceph_mirror*] Ceph mirror used to download packages.
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*stream*] Whether this is CentOS Stream or not. This parameter is used in CentOS only.
|
||||
# Optional. Defaults to undef
|
||||
#
|
||||
class ceph::repo (
|
||||
$ensure = present,
|
||||
String[1] $release = $ceph::params::release,
|
||||
@ -67,10 +69,15 @@ class ceph::repo (
|
||||
$proxy_password = undef,
|
||||
Boolean $enable_epel = true,
|
||||
Boolean $enable_sig = $ceph::params::enable_sig,
|
||||
Boolean $stream = false,
|
||||
$ceph_mirror = undef,
|
||||
# DEPRECATED PARAMETERS
|
||||
$stream = undef,
|
||||
) inherits ceph::params {
|
||||
|
||||
if $stream != undef {
|
||||
warning('The stream parameter has been deprecated and has no effect.')
|
||||
}
|
||||
|
||||
case $facts['os']['family'] {
|
||||
'Debian': {
|
||||
include apt
|
||||
@ -112,16 +119,12 @@ not on ${facts['os']['name']}, which can lead to packaging issues.")
|
||||
$ceph_mirror_real = $ceph_mirror
|
||||
} else {
|
||||
# NOTE(tobias-urdin): mirror.centos.org doesnt have https support
|
||||
if $stream {
|
||||
if versioncmp($el, '9') >= 0 {
|
||||
$centos_mirror = 'https://mirror.stream.centos.org/SIGs'
|
||||
} else {
|
||||
$centos_mirror = 'http://mirror.centos.org/centos'
|
||||
}
|
||||
$ceph_mirror_real = "${centos_mirror}/${el}-stream/storage/x86_64/ceph-${release}/"
|
||||
if versioncmp($el, '9') >= 0 {
|
||||
$centos_mirror = 'https://mirror.stream.centos.org/SIGs'
|
||||
} else {
|
||||
$ceph_mirror_real = "http://mirror.centos.org/centos/${el}/storage/x86_64/ceph-${release}/"
|
||||
$centos_mirror = 'http://mirror.centos.org/centos'
|
||||
}
|
||||
$ceph_mirror_real = "${centos_mirror}/${el}-stream/storage/x86_64/ceph-${release}/"
|
||||
}
|
||||
yumrepo { 'ceph-storage-sig':
|
||||
ensure => $ensure,
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``ceph::repo::stream`` parameter has been deprecated and has no effect.
|
||||
|
||||
upgrades:
|
||||
- |
|
||||
This module no longer supports CentOS 8. Use CentOS 8 Stream instead.
|
@ -338,8 +338,9 @@ describe 'ceph::repo' do
|
||||
it { should_not contain_yumrepo('ext-ceph') }
|
||||
it { should_not contain_yumrepo('ext-ceph-noarch') }
|
||||
|
||||
|
||||
it { should contain_yumrepo('ceph-storage-sig').with(
|
||||
:baseurl => "http://mirror.centos.org/centos/#{facts[:os]['release']['major']}/storage/x86_64/ceph-nautilus/",
|
||||
:baseurl => "#{platform_params[:centos_mirror]}/#{facts[:os]['release']['major']}-stream/storage/x86_64/ceph-nautilus/",
|
||||
)}
|
||||
end
|
||||
|
||||
@ -404,36 +405,6 @@ describe 'ceph::repo' do
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'ceph::repo on CentOS Stream 8' do
|
||||
context 'when using CentOS SIG repository and CentOS Stream 8' do
|
||||
let :params do
|
||||
{
|
||||
:enable_sig => true,
|
||||
:stream => true,
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('ceph-storage-sig').with(
|
||||
:baseurl => 'http://mirror.centos.org/centos/8-stream/storage/x86_64/ceph-nautilus/',
|
||||
)}
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'ceph::repo on CentOS Stream 9' do
|
||||
context 'when using CentOS SIG repository and CentOS Stream 9' do
|
||||
let :params do
|
||||
{
|
||||
:enable_sig => true,
|
||||
:stream => true,
|
||||
}
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('ceph-storage-sig').with(
|
||||
:baseurl => 'https://mirror.stream.centos.org/SIGs/9-stream/storage/x86_64/ceph-nautilus/',
|
||||
)}
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
@ -445,8 +416,14 @@ describe 'ceph::repo' do
|
||||
it_behaves_like "ceph::repo on #{facts[:os]['family']}"
|
||||
|
||||
if facts[:os]['name'] == 'CentOS'
|
||||
let (:platform_params) do
|
||||
if facts[:os]['release']['major'].to_i >= 9
|
||||
{ :centos_mirror => 'https://mirror.stream.centos.org/SIGs' }
|
||||
else
|
||||
{ :centos_mirror => 'http://mirror.centos.org/centos' }
|
||||
end
|
||||
end
|
||||
it_behaves_like 'ceph::repo on CentOS'
|
||||
it_behaves_like "ceph::repo on CentOS Stream #{facts[:os]['release']['major']}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user