Enhance clean PG check to catch active+clean+scrubbing and active+clean+scrubbing+deep

Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>
pull/1382/head
Anthony D'Atri 2017-03-19 00:23:26 -07:00
parent 0e4fde4b6c
commit 6c4911276e
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@
- name: waiting for clean pgs...
shell: |
test "$(ceph pg stat --cluster {{ cluster }} | sed 's/^.*pgs://;s/active+clean.*//;s/ //')" -eq "$(ceph pg stat --cluster {{ cluster }} | sed 's/pgs.*//;s/^.*://;s/ //')" && ceph health --cluster {{ cluster }} | egrep -sq "HEALTH_OK|HEALTH_WARN"
test "$(ceph pg stat --cluster {{ cluster }} | tr , '\n' | sed 's/^.*pgs: //' | awk '/active.clean/ { SUM += $1 } END {print SUM}')" -eq "$(ceph pg stat --cluster {{ cluster }} | sed 's/pgs.*//;s/^.*://;s/ //')" && ceph health --cluster {{ cluster }} | egrep -sq "HEALTH_OK|HEALTH_WARN"
register: result
until: result.rc == 0
retries: "{{ health_osd_check_retries }}"