]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
purge-container: get *all* osds id
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 31 Mar 2020 11:59:23 +0000 (13:59 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 31 Mar 2020 14:58:48 +0000 (10:58 -0400)
Adding `--all` to the `systemctl list-units` command in order to get
*all* osds id on the node (including stoppped osds). Otherwise, it will
purge the cluster but there will be leftover after that.

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

infrastructure-playbooks/purge-container-cluster.yml

index ac833fbc0b1de9a9f8d986ed705148d942b82870..bcdbecea91976994023e67387c7b5688ef0b6a90 100644 (file)
 
   - name: get all the running osds
     shell: |
-      systemctl list-units | grep 'loaded[[:space:]]\+active' | grep -oE "ceph-osd@([0-9]+).service"
+      systemctl list-units --all | grep -oE "ceph-osd@([0-9]+).service"
     register: osd_units
     ignore_errors: true