Allow disabling separate Ceph repository

This change introduces the new flag to disable the separate Ceph
repository. This is now required to migrate Ubuntu job to Jammy,
because the upstream ceph repository does not provide the packages
for Ubuntu Jammy yet.

Change-Id: I5549e5edea33e720a7d5cf67c3056036daca52fc
This commit is contained in:
Takashi Kajinami 2022-11-21 10:03:41 +09:00
parent c0204da684
commit 82d6eae248
1 changed files with 22 additions and 13 deletions

View File

@ -6,6 +6,13 @@ class openstack_integration::repos {
} else {
$ceph_version_real = 'quincy'
}
if defined('$::enable_ceph_repo') and $::enable_ceph_repo != '' {
$enable_ceph_repository = Boolean($::enable_ceph_repo)
} else {
$enable_ceph_repository = true
}
case $::osfamily {
'Debian': {
case $::operatingsystem {
@ -30,18 +37,20 @@ class openstack_integration::repos {
}
$ceph_mirror_fallback = pick($::ceph_mirror_host, "http://download.ceph.com/debian-${ceph_version_real}/")
# Ceph is both packaged on UCA and official download.ceph.com packages
# which we mirror. We want to use the official packages or our mirror.
if $ceph_mirror_fallback !~ '^http://download.ceph.com/.*' {
$ceph_version_cap = capitalize($ceph_version_real)
apt::pin { 'ceph':
priority => 1001,
originator => "Ceph ${ceph_version_cap}",
}
} else {
apt::pin { 'ceph':
priority => 1001,
origin => 'download.ceph.com',
if $enable_ceph_repository {
# Ceph is both packaged on UCA and official download.ceph.com packages
# which we mirror. We want to use the official packages or our mirror.
if $ceph_mirror_fallback !~ '^http://download.ceph.com/.*' {
$ceph_version_cap = capitalize($ceph_version_real)
apt::pin { 'ceph':
priority => 1001,
originator => "Ceph ${ceph_version_cap}",
}
} else {
apt::pin { 'ceph':
priority => 1001,
origin => 'download.ceph.com',
}
}
}
@ -122,7 +131,7 @@ class openstack_integration::repos {
}
}
if $::osfamily == 'RedHat' or $::operatingsystem == 'Ubuntu' {
if $enable_ceph_repository {
class { 'ceph::repo':
enable_sig => $enable_sig,
enable_epel => $enable_epel,