Fix select ceph version failing beaker tests

Change-Id: Ie4bd3c46882a1cd4ec2be8c6bb4850e17fe79905
This commit is contained in:
Tobias Urdin 2018-07-02 09:31:53 +02:00
parent a81d26c6c2
commit 1cafb2d4fc
3 changed files with 13 additions and 5 deletions

View File

@ -17,6 +17,7 @@
export WRITE_FACTS=${WRITE_FACTS:-true}
export DLRN_BASE=${DLRN_BASE:-centos7-master/puppet-passed-ci}
export DLRN_DEPS_BASE=${DLRN_DEPS_BASE:-centos7-master/deps/latest/}
export CEPH_VERSION=${CEPH_VERSION:-luminous}
export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
source $SCRIPT_DIR/functions

View File

@ -18,12 +18,13 @@ install_external() {
# - ``PUPPETFILE_DIR`` must be set to Puppet modules directory
# - ``SCRIPT_DIR`` must be set to script path
# - ``ZUUL_BRANCH`` must be set to Zuul branch. Fallback to 'master'.
# - ``CEPH_VERSION`` can be set to override Ceph version.
install_openstack() {
# Periodic jobs run without ref on master
ZUUL_BRANCH=${ZUUL_BRANCH:-master}
if [ $ZUUL_PROJECT != "openstack/puppet-ceph" ] && [ -n "$CEPH_VERSION" ]; then
if [ $CEPH_VERSION == "mimic" ]; then
if [ "$ZUUL_PROJECT" != "openstack/puppet-ceph" ] && [ -n "$CEPH_VERSION" ]; then
if [ "$CEPH_VERSION" == "mimic" ]; then
ZUUL_BRANCH="master"
else
ZUUL_BRANCH="stable/$CEPH_VERSION"

View File

@ -1,5 +1,11 @@
class openstack_integration::repos {
# To make beaker tests work.
if $::ceph_version != '' {
$ceph_version_real = $::ceph_version
} else {
$ceph_version_real = 'luminous'
}
case $::osfamily {
'Debian': {
case $::os_package_type {
@ -31,7 +37,7 @@ class openstack_integration::repos {
}
$enable_sig = false
$enable_epel = false
$ceph_mirror = pick($::ceph_mirror_host, "http://download.ceph.com/debian-${::ceph_version}/")
$ceph_mirror = pick($::ceph_mirror_host, "http://download.ceph.com/debian-${ceph_version_real}/")
}
'RedHat': {
class { '::openstack_extras::repo::redhat::redhat':
@ -53,9 +59,9 @@ class openstack_integration::repos {
},
}
# TODO(tobasco): Remove this CBS candidate repo for Mimic when Storage SIG release it.
$ceph_mirror_fallback = $::ceph_version ? {
$ceph_mirror_fallback = $ceph_version_real ? {
'mimic' => 'http://cbs.centos.org/repos/storage7-ceph-mimic-candidate/x86_64/os/',
default => "https://buildlogs.centos.org/centos/7/storage/x86_64/ceph-${::ceph_version}/"
default => "https://buildlogs.centos.org/centos/7/storage/x86_64/ceph-${ceph_version_real}/"
}
$ceph_mirror = pick($::ceph_mirror_host, $ceph_mirror_fallback)
# On CentOS, deploy Ceph using SIG repository and get rid of EPEL.