]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
rolling_update: pg check refactor
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 4 Feb 2021 15:24:03 +0000 (16:24 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 5 Feb 2021 23:34:14 +0000 (00:34 +0100)
There's no need to achieve this in two tasks.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/rolling_update.yml

index 0213fb1b521718013123241fdff3991d99041ae5..45136c7e3f1a535a1d18cce5dea5b0a3eb9fbf6b 100644 (file)
         CEPH_VOLUME_DEBUG: "{{ ceph_volume_debug }}"
       when: not containerized_deployment | bool
 
-    - name: get num_pgs - non container
-      command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} pg stat --format json"
-      changed_when: false
-      register: ceph_pgs
-      delegate_to: "{{ groups[mon_group_name][0] }}"
-
     - name: waiting for clean pgs...
       command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} pg stat --format json"
       register: ceph_health_post
       until: >
         (((ceph_health_post.stdout | from_json).pg_summary.num_pg_by_state | length) > 0)
         and
-        (((ceph_health_post.stdout | from_json).pg_summary.num_pg_by_state | selectattr('name', 'search', '^active\\+clean') | map(attribute='num') | list | sum) == (ceph_pgs.stdout | from_json).pg_summary.num_pgs)
+        (((ceph_health_post.stdout | from_json).pg_summary.num_pg_by_state | selectattr('name', 'search', '^active\\+clean') | map(attribute='num') | list | sum) == (ceph_health_post.stdout | from_json).pg_summary.num_pgs)
       delegate_to: "{{ groups[mon_group_name][0] }}"
+      changed_when: false
       retries: "{{ health_osd_check_retries }}"
       delay: "{{ health_osd_check_delay }}"
-      when: (ceph_pgs.stdout | from_json).pg_summary.num_pgs != 0
 
 
 - name: complete osd upgrade