mirror of https://github.com/ceph/ceph-ansible.git
fix grep match pattern for osd ids
Some playbooks use [0-9]*, others use \d+$ The latter is more correct since cluster name may contain numbers. Signed-off-by: Shengjing Zhu <zsj950618@gmail.com>pull/1316/head
parent
95bece97e5
commit
32923fd217
|
@ -234,7 +234,7 @@
|
|||
|
||||
- name: stop ceph osds on ubuntu
|
||||
shell: |
|
||||
for id in $(ls /var/lib/ceph/osd/ |grep -oh '[0-9]*'); do
|
||||
for id in $(ls /var/lib/ceph/osd/ |grep -oP '\d+$'); do
|
||||
initctl stop ceph-osd cluster={{ cluster }} id=$id
|
||||
done
|
||||
failed_when: false
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# for restarting them specifically.
|
||||
- name: restart ceph osds
|
||||
shell: |
|
||||
for id in $(ls /var/lib/ceph/osd/ |grep -oh '[0-9]*'); do
|
||||
for id in $(ls /var/lib/ceph/osd/ |grep -oP '\d+$'); do
|
||||
systemctl restart ceph-osd@$id
|
||||
sleep 5
|
||||
done
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: collect osds
|
||||
shell: |
|
||||
ls /var/lib/ceph/osd/ |grep -oh '[0-9]*'
|
||||
ls /var/lib/ceph/osd/ |grep -oP '\d+$'
|
||||
register: osd_ids
|
||||
|
||||
- name: wait for ceph osd socket(s)
|
||||
|
|
Loading…
Reference in New Issue