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 <lflores@ibm.com>
(cherry picked from commit
0b39555f9fcbb093ca03c7bad15acb4e368b99f0)
+++ /dev/null
-../../.qa
\ No newline at end of file
+++ /dev/null
-.qa/distros/container-hosts
\ No newline at end of file
+++ /dev/null
-roles:
-- - mon.a
- - mon.c
- - mgr.y
- - mds.a
- - osd.0
- - osd.1
- - osd.2
- - osd.3
- - client.0
- - node-exporter.a
- - alertmanager.a
-- - mon.b
- - mds.b
- - mgr.x
- - osd.4
- - osd.5
- - osd.6
- - osd.7
- - client.1
- - prometheus.a
- - grafana.a
- - node-exporter.b
-openstack:
-- volumes: # attached to each instance
- count: 4
- size: 10 # GB
-overrides:
- ceph:
- create_rbd_pool: true
- conf:
- osd:
- osd shutdown pgref assert: true
+++ /dev/null
-tasks:
-- install:
- branch: pacific
- exclude_packages:
- - ceph-volume
-- print: "**** done install task..."
-- print: "**** done start installing pacific cephadm ..."
-- cephadm:
- image: quay.io/ceph/daemon-base:latest-pacific
- cephadm_branch: pacific
- 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 start cephadm.shell ceph config set mgr..."
-- cephadm.shell:
- mon.a:
- - ceph config set mgr mgr/cephadm/use_repo_digest true --force
-- print: "**** done cephadm.shell ceph config set mgr..."
-
-
-- print: "**** done start telemetry pacific..."
-- workunit:
- clients:
- client.0:
- - test_telemetry_pacific.sh
-- print: "**** done end telemetry pacific..."
-
-- print: "**** done start upgrade sequence..."
-- sequential:
- - print: "**** done start upgrade..."
- - cephadm.shell:
- env: [sha1]
- mon.a:
- - ceph config set global log_to_journald false --force
- - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1
- - while ceph orch upgrade status | jq '.in_progress' | grep true ; do ceph orch ps ; ceph versions ; sleep 30 ; done
- - ceph orch ps
- - ceph versions
- - ceph versions | jq -e '.overall | length == 1'
- - ceph versions | jq -e '.overall | keys' | grep $sha1
- - print: "**** done end upgrade..."
-
- - print: "**** done start telemetry x..."
- - workunit:
- clients:
- client.0:
- - test_telemetry_pacific_x.sh
- - print: "**** done end telemetry x..."
-- print: "**** done end upgrade sequence..."
--- /dev/null
+../../.qa
\ No newline at end of file
--- /dev/null
+.qa/distros/supported-container-hosts
\ No newline at end of file
--- /dev/null
+roles:
+- - mon.a
+ - mon.c
+ - mgr.y
+ - mds.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+ - client.0
+ - node-exporter.a
+ - alertmanager.a
+- - mon.b
+ - mds.b
+ - mgr.x
+ - osd.4
+ - osd.5
+ - osd.6
+ - osd.7
+ - client.1
+ - prometheus.a
+ - grafana.a
+ - node-exporter.b
+openstack:
+- volumes: # attached to each instance
+ count: 4
+ size: 10 # GB
+overrides:
+ ceph:
+ create_rbd_pool: true
+ conf:
+ osd:
+ osd shutdown pgref assert: true
--- /dev/null
+tasks:
+- install:
+ branch: reef
+ exclude_packages:
+ - ceph-volume
+- print: "**** done install task..."
+- print: "**** done start installing reef cephadm ..."
+- cephadm:
+ 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 reef cephadm ..."
+
+- print: "**** done start cephadm.shell ceph config set mgr..."
+- cephadm.shell:
+ mon.a:
+ - ceph config set mgr mgr/cephadm/use_repo_digest true --force
+- print: "**** done cephadm.shell ceph config set mgr..."
+
+- print: "**** done start telemetry reef..."
+- workunit:
+ clients:
+ client.0:
+ - test_telemetry_reef.sh
+- print: "**** done end telemetry reef..."
+
+- print: "**** done start upgrade sequence..."
+- sequential:
+ - print: "**** done start upgrade..."
+ - cephadm.shell:
+ env: [sha1]
+ mon.a:
+ - ceph config set global log_to_journald false --force
+ - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1
+ - while ceph orch upgrade status | jq '.in_progress' | grep true ; do ceph orch ps ; ceph versions ; sleep 30 ; done
+ - ceph orch ps
+ - ceph versions
+ - ceph versions | jq -e '.overall | length == 1'
+ - ceph versions | jq -e '.overall | keys' | grep $sha1
+ - print: "**** done end upgrade..."
+
+ - print: "**** done start telemetry x..."
+ - workunit:
+ clients:
+ client.0:
+ - test_telemetry_reef_x.sh
+ - print: "**** done end telemetry x..."
+- print: "**** done end upgrade sequence..."
+++ /dev/null
-#!/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
+++ /dev/null
-#!/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