done
test $OK = "yes" || return 1
# Plan is found, but PGs still need to move
- sleep 30
+ sleep 10
+ wait_for_clean || return 1
ceph osd df
PGS=$(ceph osd df --format=json-pretty | jq '.nodes[0].pgs')
done
test $OK = "yes" || return 1
# Plan is found, but PGs still need to move
- sleep 30
+ sleep 10
+ wait_for_clean || return 1
ceph osd df
- # We should be with plue or minus 1 of FINAL_PER_OSD2
+ # We should be with plus or minus 2 of FINAL_PER_OSD2
# This is because here each pool is balanced independently
- MIN=$(expr $FINAL_PER_OSD2 - 1)
- MAX=$(expr $FINAL_PER_OSD2 + 1)
+ MIN=$(expr $FINAL_PER_OSD2 - 2)
+ MAX=$(expr $FINAL_PER_OSD2 + 2)
PGS=$(ceph osd df --format=json-pretty | jq '.nodes[0].pgs')
test $PGS -ge $MIN -a $PGS -le $MAX || return 1
PGS=$(ceph osd df --format=json-pretty | jq '.nodes[1].pgs')