From 3becdd313852e55a1b4081011b6096255b7149e4 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Fri, 14 Apr 2017 17:36:17 -0700 Subject: [PATCH] test: Test health check output for full ratios Test out of order ratios summary and details Test various full osd conditions summary and details Signed-off-by: David Zafman --- qa/workunits/cephtool/test.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index a6c7b617cc6..353e5f74518 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1424,6 +1424,39 @@ function test_mon_pg() ceph osd set-nearfull-ratio .892 ceph osd dump | grep '^nearfull_ratio 0.892' + # Check health status + ceph osd set-nearfull-ratio .913 + ceph health | grep 'HEALTH_ERR Full ratio(s) out of order' + ceph health detail | grep 'backfill_ratio (0.912) < nearfull_ratio (0.913), increased' + ceph osd set-nearfull-ratio .892 + ceph osd set-backfillfull-ratio .963 + ceph health detail | grep 'full_ratio (0.962) < backfillfull_ratio (0.963), increased' + ceph osd set-backfillfull-ratio .912 + + # Check injected full results + WAITFORFULL=10 + ceph --admin-daemon $CEPH_OUT_DIR/osd.0.asok injectfull nearfull + sleep $WAITFORFULL + ceph health | grep "HEALTH_WARN.*1 nearfull osd(s)" + ceph --admin-daemon $CEPH_OUT_DIR/osd.1.asok injectfull backfillfull + sleep $WAITFORFULL + ceph health | grep "HEALTH_WARN.*1 backfillfull osd(s)" + ceph --admin-daemon $CEPH_OUT_DIR/osd.2.asok injectfull failsafe + sleep $WAITFORFULL + # failsafe and full are the same as far as the monitor is concerned + ceph health | grep "HEALTH_ERR.*1 full osd(s)" + ceph --admin-daemon $CEPH_OUT_DIR/osd.0.asok injectfull full + sleep $WAITFORFULL + ceph health | grep "HEALTH_ERR.*2 full osd(s)" + ceph health detail | grep "osd.0 is full at.*%" + ceph health detail | grep "osd.2 is full at.*%" + ceph health detail | grep "osd.1 is backfill full at.*%" + ceph --admin-daemon $CEPH_OUT_DIR/osd.0.asok injectfull none + ceph --admin-daemon $CEPH_OUT_DIR/osd.1.asok injectfull none + ceph --admin-daemon $CEPH_OUT_DIR/osd.2.asok injectfull none + sleep $WAITFORFULL + ceph health | grep HEALTH_OK + ceph pg stat | grep 'pgs:' ceph pg 0.0 query ceph tell 0.0 query