]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch_to_container: fix osd systemd regex
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 4 Jun 2020 20:57:17 +0000 (16:57 -0400)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 16 Jun 2020 16:10:36 +0000 (12:10 -0400)
The systemd LOAD and ACTIVE fileds could have more than one space between
both values.
This update the systemd regex the same way we're using it in different
part of the code.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1843500
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 50140c9b5dfd4c865b36b333db8d2f725a905a5a)

infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 38134980c80595b2d3990f0a6c5d6d21c378edbe..bffc4a5a27b8ffc4156d641023a382ec3c547145 100644 (file)
 
     - name: collect running osds
       shell: |
-        systemctl list-units | grep "loaded active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-volume|ceph\.target'
+        systemctl list-units | grep -E "loaded * active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-volume|ceph\.target'
       register: running_osds
       changed_when: false
       failed_when: false