]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits: add crimson/ and move test_crimson_dump_metrics.sh. Edit osd-dump-metri... 67723/head
authorJose J Palacios-Perez <perezjos@uk.ibm.com>
Mon, 9 Mar 2026 16:50:15 +0000 (16:50 +0000)
committerJose J Palacios-Perez <perezjos@uk.ibm.com>
Mon, 16 Mar 2026 21:56:35 +0000 (21:56 +0000)
Signed-off-by: Jose J Palacios-Perez <perezjos@uk.ibm.com>
qa/suites/crimson-rados/singleton/all/osd-dump-metrics.yaml
qa/workunits/cephtool/test_crimson_dump_metrics.sh [deleted file]
qa/workunits/crimson/test_crimson_dump_metrics.sh [new file with mode: 0755]

index e22c901606c2cb8668c75ca2e1eac50c2c2d93bf..7c0fc68f12b65373fdf6916ab8304f53edef2fe7 100644 (file)
@@ -27,4 +27,4 @@ tasks:
 - workunit:
     clients:
       client.0:
-        - cephtool/test_crimson_dump_metrics.sh
+        - crimson/test_crimson_dump_metrics.sh
diff --git a/qa/workunits/cephtool/test_crimson_dump_metrics.sh b/qa/workunits/cephtool/test_crimson_dump_metrics.sh
deleted file mode 100755 (executable)
index 10b373a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-. $(dirname $0)/../../standalone/ceph-helpers.sh
-
-set -x
-
-function test_dump_metrics() {
-    # Ensure can get dump_metrics full
-    ceph tell osd.0 dump_metrics 2>/dev/null > /tmp/dump_metrics_full.json || true
-
-    # Ensure can get dump_metrics reactor_utilization: can be done with each metric name individually
-    ceph tell osd.0 dump_metrics reactor_utilization 2>/dev/null > /tmp/dump_metrics_reactor.json || true
-
-    # The number of occurrences must match (must be greater than zero)
-    full_count=$(grep -c reactor_utilization /tmp/dump_metrics_full.json)
-    reactor_count=$(grep -c reactor_utilization /tmp/dump_metrics_reactor.json)
-    
-    [ $full_count -gt 0 ] || return 1
-    [ $reactor_count -gt 0 ] || return 1
-    [ $full_count -eq $reactor_count ] || return 1
-
-    # Remove auxiliary files
-    rm -f /tmp/dump_metrics_full.json /tmp/dump_metrics_reactor.json
-    return 0 # success
-}
-
-# A more complete test: traverse the "metrics" section and ensure each metric contains the expected attributes
-
-test_dump_metrics || { echo "test_dump_metrics failed"; exit 1; }
-
-echo "OK"
-
diff --git a/qa/workunits/crimson/test_crimson_dump_metrics.sh b/qa/workunits/crimson/test_crimson_dump_metrics.sh
new file mode 100755 (executable)
index 0000000..923083e
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. $(dirname $0)/../../standalone/ceph-helpers.sh
+
+set -x
+
+function test_dump_metrics() {
+    # Skip this test unless the osd_type is crimson:
+    [ "$(ceph osd metadata 0 | jq -r '.osd_type')" == "crimson" ] || return 0
+
+    # Ensure can get dump_metrics full
+    ceph tell osd.0 dump_metrics 2>/dev/null > /tmp/dump_metrics_full.json || true
+
+    # Ensure can get dump_metrics reactor_utilization: can be done with each metric name individually
+    ceph tell osd.0 dump_metrics reactor_utilization 2>/dev/null > /tmp/dump_metrics_reactor.json || true
+
+    # The number of occurrences must match (must be greater than zero)
+    full_count=$(grep -c reactor_utilization /tmp/dump_metrics_full.json)
+    reactor_count=$(grep -c reactor_utilization /tmp/dump_metrics_reactor.json)
+    
+    [ $full_count -gt 0 ] || return 1
+    [ $reactor_count -gt 0 ] || return 1
+    [ $full_count -eq $reactor_count ] || return 1
+
+    # Remove auxiliary files
+    rm -f /tmp/dump_metrics_full.json /tmp/dump_metrics_reactor.json
+    return 0 # success
+}
+
+# A more complete test: traverse the "metrics" section and ensure each metric contains the expected attributes
+
+test_dump_metrics || { echo "test_dump_metrics failed"; exit 1; }
+
+echo "OK"
+