From cdb2bd5351d0e79e274e1b1bcb67171fbecabacf Mon Sep 17 00:00:00 2001 From: Laura Flores Date: Fri, 6 Dec 2024 11:51:25 -0600 Subject: [PATCH] qa/suites/upgrade/telemetry-upgrade: replace quincy tests with squid tests Since main is now pre-Tentacle, we should replace the quincy upgrade path with squid. I have kept the quincy workunits since they are still referenced in the overall upgrade suite. I will remove these in a separate PR since changing the overall upgrade tests reaches beyond the scope of just telemetry. Signed-off-by: Laura Flores --- .../telemetry-upgrade/{quincy-x => squid-x}/% | 0 .../{quincy-x => squid-x}/.qa | 0 .../{quincy-x => squid-x}/0-random-distro$ | 0 .../{quincy-x => squid-x}/0-start.yaml | 0 .../{quincy-x => squid-x}/1-tasks.yaml | 19 ++++--- qa/workunits/test_telemetry_squid.sh | 52 +++++++++++++++++++ qa/workunits/test_telemetry_squid_x.sh | 52 +++++++++++++++++++ 7 files changed, 113 insertions(+), 10 deletions(-) rename qa/suites/upgrade/telemetry-upgrade/{quincy-x => squid-x}/% (100%) rename qa/suites/upgrade/telemetry-upgrade/{quincy-x => squid-x}/.qa (100%) rename qa/suites/upgrade/telemetry-upgrade/{quincy-x => squid-x}/0-random-distro$ (100%) rename qa/suites/upgrade/telemetry-upgrade/{quincy-x => squid-x}/0-start.yaml (100%) rename qa/suites/upgrade/telemetry-upgrade/{quincy-x => squid-x}/1-tasks.yaml (82%) create mode 100755 qa/workunits/test_telemetry_squid.sh create mode 100755 qa/workunits/test_telemetry_squid_x.sh diff --git a/qa/suites/upgrade/telemetry-upgrade/quincy-x/% b/qa/suites/upgrade/telemetry-upgrade/squid-x/% similarity index 100% rename from qa/suites/upgrade/telemetry-upgrade/quincy-x/% rename to qa/suites/upgrade/telemetry-upgrade/squid-x/% diff --git a/qa/suites/upgrade/telemetry-upgrade/quincy-x/.qa b/qa/suites/upgrade/telemetry-upgrade/squid-x/.qa similarity index 100% rename from qa/suites/upgrade/telemetry-upgrade/quincy-x/.qa rename to qa/suites/upgrade/telemetry-upgrade/squid-x/.qa diff --git a/qa/suites/upgrade/telemetry-upgrade/quincy-x/0-random-distro$ b/qa/suites/upgrade/telemetry-upgrade/squid-x/0-random-distro$ similarity index 100% rename from qa/suites/upgrade/telemetry-upgrade/quincy-x/0-random-distro$ rename to qa/suites/upgrade/telemetry-upgrade/squid-x/0-random-distro$ diff --git a/qa/suites/upgrade/telemetry-upgrade/quincy-x/0-start.yaml b/qa/suites/upgrade/telemetry-upgrade/squid-x/0-start.yaml similarity index 100% rename from qa/suites/upgrade/telemetry-upgrade/quincy-x/0-start.yaml rename to qa/suites/upgrade/telemetry-upgrade/squid-x/0-start.yaml diff --git a/qa/suites/upgrade/telemetry-upgrade/quincy-x/1-tasks.yaml b/qa/suites/upgrade/telemetry-upgrade/squid-x/1-tasks.yaml similarity index 82% rename from qa/suites/upgrade/telemetry-upgrade/quincy-x/1-tasks.yaml rename to qa/suites/upgrade/telemetry-upgrade/squid-x/1-tasks.yaml index cefaee6963928..02201b67523a3 100644 --- a/qa/suites/upgrade/telemetry-upgrade/quincy-x/1-tasks.yaml +++ b/qa/suites/upgrade/telemetry-upgrade/squid-x/1-tasks.yaml @@ -19,21 +19,20 @@ overrides: - is down tasks: - install: - branch: quincy + branch: squid exclude_packages: - ceph-volume - print: "**** done install task..." -- print: "**** done start installing quincy cephadm ..." +- print: "**** done start installing squid cephadm ..." - cephadm: - image: quay.ceph.io/ceph-ci/ceph:quincy - cephadm_branch: quincy - cephadm_git_url: https://github.com/ceph/ceph + image: quay.ceph.io/ceph-ci/ceph:squid + compiled_cephadm_branch: squid 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 quincy cephadm ..." +- print: "**** done end installing squid cephadm ..." - print: "**** done start cephadm.shell ceph config set mgr..." - cephadm.shell: @@ -41,12 +40,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 quincy..." +- print: "**** done start telemetry squid..." - workunit: clients: client.0: - - test_telemetry_quincy.sh -- print: "**** done end telemetry quincy..." + - test_telemetry_squid.sh +- print: "**** done end telemetry squid..." - print: "**** done start upgrade sequence..." - sequential: @@ -73,6 +72,6 @@ tasks: - workunit: clients: client.0: - - test_telemetry_quincy_x.sh + - test_telemetry_squid_x.sh - print: "**** done end telemetry x..." - print: "**** done end upgrade sequence..." diff --git a/qa/workunits/test_telemetry_squid.sh b/qa/workunits/test_telemetry_squid.sh new file mode 100755 index 0000000000000..ace240a944ec0 --- /dev/null +++ b/qa/workunits/test_telemetry_squid.sh @@ -0,0 +1,52 @@ +#!/bin/bash -ex + +# Opt in to new collections right away to avoid "TELEMETRY_CHANGED" +# warning (see https://tracker.ceph.com/issues/64458) +ceph telemetry on --license sharing-1-0 + +# The last_opt_revision remains at 1 since last_opt_revision +# was phased out for fresh installs of quincy. +LAST_OPT_REVISION=$(ceph config get mgr mgr/telemetry/last_opt_revision) +if [ $LAST_OPT_REVISION -ne 1 ]; then + echo "last_opt_revision is incorrect" + exit 1 +fi + +# Check the warning: +ceph -s + +# Verify collections +REPORTED_COLLECTIONS=$(ceph telemetry collection ls) +NUM_REPORTED_COLLECTIONS=$(echo "$REPORTED_COLLECTIONS" | awk '/^NAME/ {flag=1; next} flag' | wc -l) +KNOWN_COLLECTIONS=("basic_base" "basic_mds_metadata" "basic_pool_flags" "basic_pool_options_bluestore" + "basic_pool_usage" "basic_rook_v01" "basic_usage_by_class" "crash_base" + "device_base" "ident_base" "perf_memory_metrics" "perf_perf") + +if ! [[ $NUM_REPORTED_COLLECTIONS == "${#KNOWN_COLLECTIONS[@]}" ]]; +then + echo "Number of reported collections ($NUM_REPORTED_COLLECTIONS) does not match KNOWN_COLLECTIONS ("${#KNOWN_COLLECTIONS[@]}")." + exit 1 +fi + +for col in ${KNOWN_COLLECTIONS[@]}; do + if ! [[ $REPORTED_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 + +# Run show commands +ceph telemetry show +ceph telemetry show-device +ceph telemetry show + +# Opt out +ceph telemetry off + +echo OK diff --git a/qa/workunits/test_telemetry_squid_x.sh b/qa/workunits/test_telemetry_squid_x.sh new file mode 100755 index 0000000000000..07bd942b91457 --- /dev/null +++ b/qa/workunits/test_telemetry_squid_x.sh @@ -0,0 +1,52 @@ +#!/bin/bash -ex + +# Opt in to new collections right away to avoid "TELEMETRY_CHANGED" +# warning (see https://tracker.ceph.com/issues/64458) +ceph telemetry on --license sharing-1-0 + +# The last_opt_revision remains at 1 since last_opt_revision +# was phased out for fresh installs of quincy. +LAST_OPT_REVISION=$(ceph config get mgr mgr/telemetry/last_opt_revision) +if [ $LAST_OPT_REVISION -ne 1 ]; then + echo "last_opt_revision is incorrect" + exit 1 +fi + +# Check the warning: +ceph -s + +# Verify collections +REPORTED_COLLECTIONS=$(ceph telemetry collection ls) +NUM_REPORTED_COLLECTIONS=$(echo "$REPORTED_COLLECTIONS" | awk '/^NAME/ {flag=1; next} flag' | wc -l) +KNOWN_COLLECTIONS=("basic_base" "basic_mds_metadata" "basic_pool_flags" "basic_pool_options_bluestore" + "basic_pool_usage" "basic_rook_v01" "basic_usage_by_class" "crash_base" "device_base" + "ident_base" "perf_memory_metrics" "perf_perf") + +if ! [[ $NUM_REPORTED_COLLECTIONS == "${#KNOWN_COLLECTIONS[@]}" ]]; +then + echo "Number of reported collections ($NUM_REPORTED_COLLECTIONS) does not match KNOWN_COLLECTIONS ("${#KNOWN_COLLECTIONS[@]}")." + exit 1 +fi + +for col in ${KNOWN_COLLECTIONS[@]}; do + if ! [[ $REPORTED_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 + +# Run show commands +ceph telemetry show +ceph telemetry show-device +ceph telemetry show + +# Opt out +ceph telemetry off + +echo OK -- 2.39.5