From c5545a3db56ce3b7a011625c715879611ced0775 Mon Sep 17 00:00:00 2001 From: Victoria Martinez de la Cruz Date: Sat, 23 Jan 2021 14:18:03 +0000 Subject: [PATCH] Enable testing Ceph master This changeset adds a config option (TEST_MASTER) to toggle testing with the current Ceph master. The builds are retrieved from Shaman, which is the platform used by the Ceph community to submit their latest builds. The main goal of this change is to use this on our CI and be able to catch bugs in OpenStack services that use Ceph as a backend more quickly. Because of this, the required non-voting job is also added. Change-Id: Ibe26f89e7be3061cdb7acb441727efb2c396e29e --- .zuul.yaml | 13 +++++++++++++ devstack/lib/ceph | 19 ++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index bdbd9936..f276157e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -196,6 +196,17 @@ REMOTE_CEPH: true CINDER_CEPH_UUID: d531d2d4-3937-429c-b0c2-658fe41e82aa +- job: + name: devstack-plugin-ceph-master-tempest + parent: devstack-plugin-ceph-tempest-py3-base + description: | + Integration tests that runs with the ceph devstack plugin + using Ceph master as the backend. + branches: master + vars: + devstack_localrc: + TEST_MASTER: true + - project-template: name: devstack-plugin-ceph-tempest-jobs description: | @@ -211,6 +222,8 @@ voting: false - devstack-plugin-ceph-tempest-fedora-latest - devstack-plugin-ceph-multinode-tempest-py3 + - devstack-plugin-ceph-master-tempest: + voting: false gate: jobs: - devstack-plugin-ceph-tempest-py3 diff --git a/devstack/lib/ceph b/devstack/lib/ceph index 5bdbddd8..879bb22c 100755 --- a/devstack/lib/ceph +++ b/devstack/lib/ceph @@ -26,6 +26,8 @@ set +o xtrace # Defaults # -------- +TEST_MASTER=$(trueorfalse False TEST_MASTER) + CEPH_RELEASE=${CEPH_RELEASE:-octopus} GANESHA_RELEASE=${GANESHA_RELEASE:-V3.3-stable} @@ -969,11 +971,22 @@ function configure_repo_ceph { local distro_release="$3" if is_ubuntu; then - wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add - - sudo apt-add-repository -y "deb https://download.ceph.com/debian-${ceph_release}/ ${distro_release} main" + if [[ "${TEST_MASTER}" == "True" ]]; then + repo_file_name="/etc/apt/sources.list.d/ceph-master.list" + sudo wget -c "https://shaman.ceph.com/api/repos/ceph/master/latest/ubuntu/${distro_release}/flavors/default/repo" -O ${repo_file_name} + else + wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add - + sudo apt-add-repository -y "deb https://download.ceph.com/debian-${ceph_release}/ ${distro_release} main" + fi sudo ${package_manager} -y update elif is_fedora; then - dnf_add_repository_ceph ${ceph_release} ${distro_release} + if [[ "${TEST_MASTER}" == "True" ]]; then + repo_file_name="/etc/yum.repos.d/ceph-master.repo" + sudo wget -c "https://shaman.ceph.com/api/repos/ceph/master/latest/centos/${distro_release}/flavors/default/repo" -O ${repo_file_name} + sudo dnf config-manager --add-repo ${repo_file_name} + else + dnf_add_repository_ceph ${ceph_release} ${distro_release} + fi fi }