Pick proper mirror for ceph apt::pin

When running in CI the ceph packages are mirrored
and the official download.ceph.com is not used.

This changes so we apt::pin the proper mirror that
the ceph packages come from, otherwise the ubuntu
cloud-archive ceph packages will be installed instead
of the official ceph ones.

Change-Id: Ica5e74bc67663541f8564a8920db5567f6c85197
This commit is contained in:
Tobias Urdin 2018-08-20 15:25:13 +02:00
parent 7d13074f78
commit 2d845b9a3b
2 changed files with 15 additions and 6 deletions

View File

@ -70,6 +70,7 @@ if [[ -z "$rdo_dlrn" ]]; then
fi
RDO_MIRROR_HOST=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
export FACTER_nodepool_mirror_host=$NODEPOOL_MIRROR_HOST
export FACTER_centos_mirror_host=$CENTOS_MIRROR_HOST
export FACTER_uca_mirror_host=$NODEPOOL_UCA_MIRROR
export FACTER_deps_mirror_host=$DEPS_MIRROR_HOST
@ -78,6 +79,7 @@ export FACTER_rdo_mirror_host=$RDO_MIRROR_HOST
export FACTER_ceph_version=$CEPH_VERSION
MIRROR_FACTS="\
nodepool_mirror_host=${FACTER_nodepool_mirror_host}
centos_mirror_host=${FACTER_centos_mirror_host}
uca_mirror_host=${FACTER_uca_mirror_host}
deps_mirror_host=${FACTER_deps_mirror_host}

View File

@ -28,12 +28,19 @@ class openstack_integration::repos {
fail("Unsupported package type (${::os_package_type})")
}
}
# Ceph is both packaged on UCA & ceph.com
# Official packages are on ceph.com so we want to make sure
# Ceph will be installed from there.
apt::pin { 'ceph':
priority => 1001,
origin => 'download.ceph.com',
# 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 $::nodepool_mirror_host != '' {
$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',
}
}
$enable_sig = false
$enable_epel = false