summaryrefslogtreecommitdiffstats
path: root/qa/workunits/test_telemetry_quincy_x.sh
blob: 4734132d024c3645009f08af017d514e0e4006c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash -ex

# For quincy, 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

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
# Currently, no new collections between latest quincy and reef (dev)

# Run show commands
ceph telemetry show
ceph telemetry show-device
ceph telemetry show

# Opt out
ceph telemetry off

echo OK