}
-function wait_for_state() {
+function wait_for_not_state() {
local state=$1
local num_in_state=-1
local cur_in_state
}
-function wait_for_backfill() {
+function wait_for_not_backfilling() {
local timeout=$1
- wait_for_state backfilling $timeout
+ wait_for_not_state backfilling $timeout
}
-function wait_for_active() {
+function wait_for_not_activating() {
local timeout=$1
- wait_for_state activating $timeout
+ wait_for_not_state activating $timeout
}
# All tests are created in an environment which has fake total space
done
sleep 30
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
ERRORS=0
if [ "$(ceph pg dump pgs | grep +backfill_toofull | wc -l)" != "1" ];
done
sleep 30
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
ERRORS=0
full="$(ceph pg dump pgs | grep +backfill_toofull | wc -l)"
ceph osd pool set $pool2 size 2
sleep 30
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
ERRORS=0
if [ "$(ceph pg dump pgs | grep +backfill_toofull | wc -l)" != "1" ];
ceph osd in osd.$fillosd
sleep 30
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
flush_pg_stats || return 1
ceph pg dump pgs
ceph pg dump pgs
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
ceph pg dump pgs
sleep 30
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
ceph pg dump pgs
sleep 30
ceph pg dump pgs
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
ceph pg dump pgs
ceph osd in osd.$fillosd
sleep 30
- wait_for_backfill 240 || return 1
- wait_for_active 60 || return 1
+ wait_for_not_backfilling 240 || return 1
+ wait_for_not_activating 60 || return 1
ERRORS=0
if [ "$(ceph pg dump pgs | grep -v "^1.0" | grep +backfill_toofull | wc -l)" != "1" ];