]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Enhance clean PG check to catch active+clean+scrubbing and active+clean+scrubbing... 1382/head
authorAnthony D'Atri <anthony.datri@gmail.com>
Sun, 19 Mar 2017 07:23:26 +0000 (00:23 -0700)
committerAnthony D'Atri <anthony.datri@gmail.com>
Sun, 19 Mar 2017 07:23:26 +0000 (00:23 -0700)
Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>
infrastructure-playbooks/rolling_update.yml

index 24d1253ef8be5f7a7bff6c738773b1d50ba06834..b351b66d398952bb2f154e6bee281a80e63b011e 100644 (file)
 
     - 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 }}"