From 93c841d3796f1b55788c511551da5893d163f6a7 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 23 Jan 2023 14:04:07 +0900 Subject: [PATCH] Forcefully disables ceph repository in Ubuntu Jammy This is follow-up of I5549e5edea33e720a7d5cf67c3056036daca52fc and always disables ceph repository in Ubuntu Jammy. This is required to disable the repository in litmus jobs. Depends-on: https://review.opendev.org/871542 Change-Id: I79aefa3e9d19c34fa6f13c861008cce3f6cb97ef --- configure_facts.sh | 5 +---- manifests/repos.pp | 6 ++++-- playbooks/run-integration-tests.yaml | 1 - playbooks/run-libraries-litmus-tests.yaml | 1 - playbooks/run-litmus-tests.yaml | 1 - zuul.d/integration.yaml | 10 ---------- zuul.d/litmus.yaml | 4 ---- 7 files changed, 5 insertions(+), 23 deletions(-) diff --git a/configure_facts.sh b/configure_facts.sh index 653381b3e..50b3efcd4 100644 --- a/configure_facts.sh +++ b/configure_facts.sh @@ -23,7 +23,6 @@ export DLRN_DEPS_BASE=${DLRN_DEPS_BASE:-${OS_NAME_VERS}-master/deps/latest/} export DLRN_BASE_URL=${DLRN_BASE_URL:-${OS_NAME_VERS}-master/puppet-passed-ci/delorean.repo} export DLRN_DEPS_URL=${DLRN_DEPS_URL:-${OS_NAME_VERS}-master/delorean-deps.repo} export CEPH_VERSION=${CEPH_VERSION:-quincy} -export ENABLE_CEPH_REPO=${ENABLE_CEPH_REPO:-true} export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) source $SCRIPT_DIR/functions @@ -69,7 +68,6 @@ export FACTER_ceph_mirror_host=$CEPH_MIRROR_HOST export FACTER_ceph_version=$CEPH_VERSION export FACTER_delorean_repo_path="/tmp/delorean.repo" export FACTER_delorean_deps_repo_path="/tmp/delorean-deps.repo" -export FACTER_enable_ceph_repo=$ENABLE_CEPH_REPO MIRROR_FACTS="\ nodepool_mirror_host=${FACTER_nodepool_mirror_host} @@ -79,8 +77,7 @@ deps_mirror_host=${FACTER_deps_mirror_host} ceph_mirror_host=${FACTER_ceph_mirror_host} ceph_version=${FACTER_ceph_version} delorean_repo_path=${FACTER_delorean_repo_path} -delorean_deps_repo_path=${FACTER_delorean_deps_repo_path} -enable_ceph_repo=${FACTER_enable_ceph_repo}" +delorean_deps_repo_path=${FACTER_delorean_deps_repo_path}" if [ "${WRITE_FACTS}" = true ]; then $SUDO mkdir -p /etc/facter/facts.d/ diff --git a/manifests/repos.pp b/manifests/repos.pp index 993d3858c..38f83ef4c 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -7,8 +7,10 @@ class openstack_integration::repos { $ceph_version_real = 'quincy' } - if defined('$::enable_ceph_repo') and $::enable_ceph_repo != '' { - $enable_ceph_repository = Boolean($::enable_ceph_repo) + if $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemmajrelease, '22') >= 0 { + # NOTE(tkajinam): Upstream ceph repository does not provide packages for + # Ubuntu Jammy, so we use packages from UCA. + $enable_ceph_repository = false } else { $enable_ceph_repository = true } diff --git a/playbooks/run-integration-tests.yaml b/playbooks/run-integration-tests.yaml index 0d269c327..4627e7531 100644 --- a/playbooks/run-integration-tests.yaml +++ b/playbooks/run-integration-tests.yaml @@ -5,7 +5,6 @@ set -ex trap "./copy_logs.sh" EXIT export CEPH_VERSION={{ ceph }} - export ENABLE_CEPH_REPO={{ enable_ceph_repo | default(true) }} export PUPPET_MAJ_VERSION={{ puppet }} export SCENARIO={{ scenario }} export GEM_HOME=`pwd`/.bundled_gems diff --git a/playbooks/run-libraries-litmus-tests.yaml b/playbooks/run-libraries-litmus-tests.yaml index c62ea1741..e7b09d505 100644 --- a/playbooks/run-libraries-litmus-tests.yaml +++ b/playbooks/run-libraries-litmus-tests.yaml @@ -6,7 +6,6 @@ set -x trap "{{ ansible_user_dir }}/workspace/puppet-openstack-integration/copy_logs.sh" EXIT export CEPH_VERSION={{ ceph }} - export ENABLE_CEPH_REPO={{ enable_ceph_repo | default(true) }} if [ "{{ puppet_gem_version }}" != "latest" ]; then export PUPPET_GEM_VERSION='~> {{ puppet_gem_version }}' fi diff --git a/playbooks/run-litmus-tests.yaml b/playbooks/run-litmus-tests.yaml index 87fcb3afc..0d6181c78 100644 --- a/playbooks/run-litmus-tests.yaml +++ b/playbooks/run-litmus-tests.yaml @@ -12,7 +12,6 @@ } trap trap_exit_sig EXIT export CEPH_VERSION={{ ceph }} - export ENABLE_CEPH_REPO={{ enable_ceph_repo | default(true) }} if [ "{{ puppet_gem_version }}" != "latest" ]; then export PUPPET_GEM_VERSION='~> {{ puppet_gem_version }}' fi diff --git a/zuul.d/integration.yaml b/zuul.d/integration.yaml index 8cdd41fd1..36ff2ea11 100644 --- a/zuul.d/integration.yaml +++ b/zuul.d/integration.yaml @@ -35,8 +35,6 @@ parent: puppet-openstack-integration-7-scenario001 nodeset: ubuntu-jammy voting: false - vars: - enable_ceph_repo: false - job: name: puppet-openstack-integration-7-scenario001-tempest-centos-9-stream @@ -58,8 +56,6 @@ parent: puppet-openstack-integration-7-scenario002 nodeset: ubuntu-jammy voting: false - vars: - enable_ceph_repo: false - job: name: puppet-openstack-integration-7-scenario002-tempest-centos-9-stream @@ -81,8 +77,6 @@ parent: puppet-openstack-integration-7-scenario003 nodeset: ubuntu-jammy voting: false - vars: - enable_ceph_repo: false - job: name: puppet-openstack-integration-7-scenario003-tempest-centos-9-stream @@ -105,8 +99,6 @@ parent: puppet-openstack-integration-7-scenario004 nodeset: ubuntu-jammy voting: false - vars: - enable_ceph_repo: false - job: name: puppet-openstack-integration-7-scenario004-tempest-centos-9-stream @@ -129,8 +121,6 @@ parent: puppet-openstack-integration-7-scenario005 nodeset: ubuntu-jammy voting: false - vars: - enable_ceph_repo: false - job: name: puppet-openstack-integration-7-scenario005-tempest-centos-9-stream diff --git a/zuul.d/litmus.yaml b/zuul.d/litmus.yaml index 86eeb8026..559b1af24 100644 --- a/zuul.d/litmus.yaml +++ b/zuul.d/litmus.yaml @@ -54,7 +54,6 @@ vars: puppet_gem_version: 7.16.0 ceph: quincy - enable_ceph_repo: false - job: name: puppet-openstack-litmus-latest-ubuntu-jammy @@ -64,7 +63,6 @@ vars: puppet_gem_version: latest ceph: quincy - enable_ceph_repo: false - job: name: puppet-openstack-libraries-litmus-7.16-centos-9-stream @@ -80,7 +78,6 @@ nodeset: ubuntu-jammy vars: puppet_gem_version: 7.16.0 - enable_ceph_repo: false - job: name: puppet-openstack-libraries-litmus-latest-ubuntu-jammy @@ -89,7 +86,6 @@ nodeset: ubuntu-jammy vars: puppet_gem_version: latest - enable_ceph_repo: false - project-template: name: puppet-openstack-litmus-jobs