From 5dac46742190f90fc7240a464795a09fdbc27a0e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 21 Jul 2020 08:36:06 +0900 Subject: [PATCH] Use repo files to setup RDO repositories ... so that we can set up RDO CentOS8 repositories correctly by puppet. Depends-on: https://review.opendev.org/#/c/741867/ Change-Id: I93e4f9916d3f444379bd9a901448d852bc702a04 --- configure_facts.sh | 9 --------- manifests/repos.pp | 17 ++++------------- run_tests.sh | 12 ++---------- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/configure_facts.sh b/configure_facts.sh index 0728536f7..dfa5504fa 100644 --- a/configure_facts.sh +++ b/configure_facts.sh @@ -67,19 +67,11 @@ else fi fi -rdo_dlrn=`curl --silent ${NODEPOOL_RDO_PROXY}/${DLRN_BASE}/delorean.repo | grep baseurl | cut -d= -f2` -if [[ -z "$rdo_dlrn" ]] && [ -f /etc/redhat-release ] ; then - echo "Failed to parse dlrn hash" - exit 1 -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 export FACTER_ceph_mirror_host=$CEPH_MIRROR_HOST -export FACTER_rdo_mirror_host=$RDO_MIRROR_HOST export FACTER_ceph_version=$CEPH_VERSION MIRROR_FACTS="\ @@ -88,7 +80,6 @@ centos_mirror_host=${FACTER_centos_mirror_host} uca_mirror_host=${FACTER_uca_mirror_host} deps_mirror_host=${FACTER_deps_mirror_host} ceph_mirror_host=${FACTER_ceph_mirror_host} -rdo_mirror_host=${FACTER_rdo_mirror_host} ceph_version=${FACTER_ceph_version}" if [ "${WRITE_FACTS}" = true ]; then diff --git a/manifests/repos.pp b/manifests/repos.pp index 37b5b5c18..25581d3d4 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -51,19 +51,10 @@ class openstack_integration::repos { manage_rdo => false, manage_epel => false, centos_mirror_url => $::centos_mirror_host, - repo_hash => { - 'master-puppet-passed-ci' => { - 'baseurl' => pick($::rdo_mirror_host, "https://trunk.rdoproject.org/centos${::os['release']['major']}-master/puppet-passed-ci/"), - 'descr' => 'master puppet-passed-ci', - 'gpgcheck' => 'no', - 'priority' => 1, - }, - 'master-delorean-deps' => { - 'baseurl' => pick($::deps_mirror_host, "https://trunk.rdoproject.org/centos${::os['release']['major']}-master/deps/latest/"), - 'descr' => 'master delorean-deps', - 'gpgcheck' => 'no', - }, - }, + repo_source_hash => { + 'delorean.repo' => "https://trunk.rdoproject.org/centos${::os['release']['major']}-master/puppet-passed-ci/delorean.repo", + 'delorean-deps.repo' => "https://trunk.rdoproject.org/centos${::os['release']['major']}-master/delorean-deps.repo" + } } # NOTE(tobias-urdin): Mimic was never released by Storage SIG to official mirros. $ceph_mirror_fallback = $ceph_version_real ? { diff --git a/run_tests.sh b/run_tests.sh index 6c4a091ac..44accd3e8 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -202,16 +202,8 @@ fi set +e if [ "${MANAGE_REPOS}" = true ]; then print_header 'Install repos' - if [[ "${REDHAT_SUPPORT_PRODUCT,,}" = "centos" && ${REDHAT_SUPPORT_PRODUCT_VERSION} = "8" ]]; then - $SUDO curl -o /etc/yum.repos.d/delorean.repo ${NODEPOOL_RDO_PROXY}/${DLRN_BASE_URL} - $SUDO sed -i "s|https://trunk.rdoproject.org|${NODEPOOL_RDO_PROXY}|" /etc/yum.repos.d/delorean.repo - $SUDO curl -o /etc/yum.repos.d/delorean-deps.repo ${NODEPOOL_RDO_PROXY}/${DLRN_DEPS_URL} - $SUDO sed -i "s|https://trunk.rdoproject.org|${NODEPOOL_RDO_PROXY}|" /etc/yum.repos.d/delorean-deps.repo - RESULT=$? - else - $SUDO $PUPPET_FULL_PATH apply $PUPPET_ARGS -e "include openstack_integration::repos" - RESULT=$? - fi + $SUDO $PUPPET_FULL_PATH apply $PUPPET_ARGS -e "include openstack_integration::repos" + RESULT=$? if [ $RESULT -ne 0 ] && [ $RESULT -ne 2 ]; then print_header 'Puppet failed to install repositories.' exit 1