diff --git a/configure_facts.sh b/configure_facts.sh index 31911da25..2bb3e8e71 100644 --- a/configure_facts.sh +++ b/configure_facts.sh @@ -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} diff --git a/manifests/repos.pp b/manifests/repos.pp index 97484e94d..e70cca602 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -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