From: David Zafman Date: Sat, 15 Apr 2017 00:36:17 +0000 (-0700) Subject: test: Test health check output for full ratios X-Git-Tag: v12.0.2~51^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13968%2Fhead;p=ceph.git 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 --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index a6c7b617cc67..353e5f745189 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