]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
upgrade: consider all 'active+clean' states as valid pgs
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 24 Sep 2018 12:21:24 +0000 (14:21 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Fri, 12 Oct 2018 11:38:19 +0000 (11:38 +0000)
In cluster with a large number of PGs, it can be expected some of them
scrubbing, it's a normal operation.
Preventing from scrubbing operation force to set noscrub flag before a
rolling update which is a problem because it pauses an important data
integrity operation until the end of the rolling upgrade.

This commit allows an upgrade even while PGs are scrubbing.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1616066
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit c13a3c34929f34af11fbd746e9c0502a70f84b97)

infrastructure-playbooks/rolling_update.yml

index 8fccf57d4bde0666d6ab4216cdbc96c53af9e14b..aefdab775acfcfc64a283d104d4c7a23fcd53299 100644 (file)
       with_items:
         - noout
         - norebalance
-        - noscrub
-        - nodeep-scrub
       delegate_to: "{{ mon_host }}"
       when: not containerized_deployment
 
       with_items:
         - noout
         - norebalance
-        - noscrub
-        - nodeep-scrub
       delegate_to: "{{ mon_host }}"
       when: containerized_deployment
 
       command: "{{ docker_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} -s --format json"
       register: ceph_health_post
       until: >
-        ((ceph_health_post.stdout | from_json).pgmap.pgs_by_state | length) == 1
-        and
-        (ceph_health_post.stdout | from_json).pgmap.pgs_by_state.0.state_name == "active+clean"
+        ((ceph_health_post.stdout | from_json).pgmap.pgs_by_state | selectattr('state_name', 'search', '^active\\+clean') | map(attribute='count') | list | sum) == (ceph_pgs.stdout | from_json).pgmap.num_pgs
       delegate_to: "{{ groups[mon_group_name][0] }}"
       retries: "{{ health_osd_check_retries }}"
       delay: "{{ health_osd_check_delay }}"
       with_items:
         - noout
         - norebalance
-        - noscrub
-        - nodeep-scrub
       delegate_to: "{{ groups[mon_group_name][0] }}"
 
     - name: get osd versions