From 410205470a8135205ef26ac4ca46a2a43deaf3fd Mon Sep 17 00:00:00 2001 From: Laura Flores Date: Tue, 11 Jun 2024 15:10:01 -0500 Subject: [PATCH] qa/suites/upgrade/telemetry-upgrade: upgrade from reef instead of pacific With cephadm upgrades, we are only allowed to upgrade from as far back as N-2 releases. On the main branch, that means we can only upgrade from quincy and reef, and we can no longer upgrade from pacific. This test was trying to upgrade from pacific, which isn't allowed, which led to an `UPGRADE_BAD_TARGET_VERSION` cluster error. Fixes: https://tracker.ceph.com/issues/65189 Signed-off-by: Laura Flores (cherry picked from commit 0b39555f9fcbb093ca03c7bad15acb4e368b99f0) --- .../pacific-x/0-random-distro$ | 1 - .../telemetry-upgrade/{pacific-x => reef-x}/% | 0 .../{pacific-x => reef-x}/.qa | 0 .../telemetry-upgrade/reef-x/0-random-distro$ | 1 + .../{pacific-x => reef-x}/0-start.yaml | 0 .../{pacific-x => reef-x}/1-tasks.yaml | 19 +++--- qa/workunits/test_telemetry_pacific.sh | 23 -------- qa/workunits/test_telemetry_pacific_x.sh | 59 ------------------- 8 files changed, 10 insertions(+), 93 deletions(-) delete mode 120000 qa/suites/upgrade/telemetry-upgrade/pacific-x/0-random-distro$ rename qa/suites/upgrade/telemetry-upgrade/{pacific-x => reef-x}/% (100%) rename qa/suites/upgrade/telemetry-upgrade/{pacific-x => reef-x}/.qa (100%) create mode 120000 qa/suites/upgrade/telemetry-upgrade/reef-x/0-random-distro$ rename qa/suites/upgrade/telemetry-upgrade/{pacific-x => reef-x}/0-start.yaml (100%) rename qa/suites/upgrade/telemetry-upgrade/{pacific-x => reef-x}/1-tasks.yaml (78%) delete mode 100755 qa/workunits/test_telemetry_pacific.sh delete mode 100755 qa/workunits/test_telemetry_pacific_x.sh diff --git a/qa/suites/upgrade/telemetry-upgrade/pacific-x/0-random-distro$ b/qa/suites/upgrade/telemetry-upgrade/pacific-x/0-random-distro$ deleted file mode 120000 index 4b341719de407..0000000000000 --- a/qa/suites/upgrade/telemetry-upgrade/pacific-x/0-random-distro$ +++ /dev/null @@ -1 +0,0 @@ -.qa/distros/container-hosts \ No newline at end of file diff --git a/qa/suites/upgrade/telemetry-upgrade/pacific-x/% b/qa/suites/upgrade/telemetry-upgrade/reef-x/% similarity index 100% rename from qa/suites/upgrade/telemetry-upgrade/pacific-x/% rename to qa/suites/upgrade/telemetry-upgrade/reef-x/% diff --git a/qa/suites/upgrade/telemetry-upgrade/pacific-x/.qa b/qa/suites/upgrade/telemetry-upgrade/reef-x/.qa similarity index 100% rename from qa/suites/upgrade/telemetry-upgrade/pacific-x/.qa rename to qa/suites/upgrade/telemetry-upgrade/reef-x/.qa diff --git a/qa/suites/upgrade/telemetry-upgrade/reef-x/0-random-distro$ b/qa/suites/upgrade/telemetry-upgrade/reef-x/0-random-distro$ new file mode 120000 index 0000000000000..66187855738ef --- /dev/null +++ b/qa/suites/upgrade/telemetry-upgrade/reef-x/0-random-distro$ @@ -0,0 +1 @@ +.qa/distros/supported-container-hosts \ No newline at end of file diff --git a/qa/suites/upgrade/telemetry-upgrade/pacific-x/0-start.yaml b/qa/suites/upgrade/telemetry-upgrade/reef-x/0-start.yaml similarity index 100% rename from qa/suites/upgrade/telemetry-upgrade/pacific-x/0-start.yaml rename to qa/suites/upgrade/telemetry-upgrade/reef-x/0-start.yaml diff --git a/qa/suites/upgrade/telemetry-upgrade/pacific-x/1-tasks.yaml b/qa/suites/upgrade/telemetry-upgrade/reef-x/1-tasks.yaml similarity index 78% rename from qa/suites/upgrade/telemetry-upgrade/pacific-x/1-tasks.yaml rename to qa/suites/upgrade/telemetry-upgrade/reef-x/1-tasks.yaml index 28b9eb29fc95a..5163a54fe24e4 100644 --- a/qa/suites/upgrade/telemetry-upgrade/pacific-x/1-tasks.yaml +++ b/qa/suites/upgrade/telemetry-upgrade/reef-x/1-tasks.yaml @@ -1,20 +1,20 @@ tasks: - install: - branch: pacific + branch: reef exclude_packages: - ceph-volume - print: "**** done install task..." -- print: "**** done start installing pacific cephadm ..." +- print: "**** done start installing reef cephadm ..." - cephadm: - image: quay.io/ceph/daemon-base:latest-pacific - cephadm_branch: pacific + image: quay.io/ceph/daemon-base:latest-reef + cephadm_branch: reef cephadm_git_url: https://github.com/ceph/ceph conf: osd: #set config option for which cls modules are allowed to be loaded / used osd_class_load_list: "*" osd_class_default_list: "*" -- print: "**** done end installing pacific cephadm ..." +- print: "**** done end installing reef cephadm ..." - print: "**** done start cephadm.shell ceph config set mgr..." - cephadm.shell: @@ -22,13 +22,12 @@ tasks: - ceph config set mgr mgr/cephadm/use_repo_digest true --force - print: "**** done cephadm.shell ceph config set mgr..." - -- print: "**** done start telemetry pacific..." +- print: "**** done start telemetry reef..." - workunit: clients: client.0: - - test_telemetry_pacific.sh -- print: "**** done end telemetry pacific..." + - test_telemetry_reef.sh +- print: "**** done end telemetry reef..." - print: "**** done start upgrade sequence..." - sequential: @@ -49,6 +48,6 @@ tasks: - workunit: clients: client.0: - - test_telemetry_pacific_x.sh + - test_telemetry_reef_x.sh - print: "**** done end telemetry x..." - print: "**** done end upgrade sequence..." diff --git a/qa/workunits/test_telemetry_pacific.sh b/qa/workunits/test_telemetry_pacific.sh deleted file mode 100755 index a971f5883f036..0000000000000 --- a/qa/workunits/test_telemetry_pacific.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -ex - -# Set up ident details for cluster -ceph config set mgr mgr/telemetry/channel_ident true -ceph config set mgr mgr/telemetry/organization 'ceph-qa' -ceph config set mgr mgr/telemetry/description 'upgrade test cluster' - -# Opt-in -ceph telemetry on --license sharing-1-0 - -# Check last_opt_revision -LAST_OPT_REVISION=$(ceph config get mgr mgr/telemetry/last_opt_revision) -if [ $LAST_OPT_REVISION -ne 3 ]; then - echo "last_opt_revision is incorrect." - exit 1 -fi - -# Check reports -ceph telemetry show -ceph telemetry show-device -ceph telemetry show-all - -echo OK diff --git a/qa/workunits/test_telemetry_pacific_x.sh b/qa/workunits/test_telemetry_pacific_x.sh deleted file mode 100755 index 0e4a832db64f6..0000000000000 --- a/qa/workunits/test_telemetry_pacific_x.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -ex - -# Assert that we're still opted in -LAST_OPT_REVISION=$(ceph config get mgr mgr/telemetry/last_opt_revision) -if [ $LAST_OPT_REVISION -ne 3 ]; then - echo "last_opt_revision is incorrect" - exit 1 -fi - -# Check the warning: -STATUS=$(ceph -s) -if ! [[ $STATUS == *"Telemetry requires re-opt-in"* ]] -then - echo "STATUS does not contain re-opt-in warning" - exit 1 -fi - -# Check new collections -COLLECTIONS=$(ceph telemetry collection ls) -NEW_COLLECTIONS=("perf_perf" "basic_mds_metadata" "basic_pool_usage" "basic_rook_v01" "perf_memory_metrics") -for col in ${NEW_COLLECTIONS[@]}; do - if ! [[ $COLLECTIONS == *$col* ]]; - then - echo "COLLECTIONS does not contain" "'"$col"'." - exit 1 - fi -done - -# Run preview commands -ceph telemetry preview -ceph telemetry preview-device -ceph telemetry preview-all - -# Opt in to new collections -ceph telemetry on --license sharing-1-0 -ceph telemetry enable channel perf - -# Check the warning: -timeout=60 -STATUS=$(ceph -s) -until [[ $STATUS != *"Telemetry requires re-opt-in"* ]] || [ $timeout -le 0 ]; do - STATUS=$(ceph -s) - sleep 1 - timeout=$(( timeout - 1 )) -done -if [ $timeout -le 0 ]; then - echo "STATUS should not contain re-opt-in warning at this point" - exit 1 -fi - -# Run show commands -ceph telemetry show -ceph telemetry show-device -ceph telemetry show - -# Opt out -ceph telemetry off - -echo OK -- 2.39.5