Merge pull request #1316 from zhsj/fix-osd-id

fix grep match pattern for osd ids
pull/1322/head
Sébastien Han 2017-02-20 16:57:14 -05:00 committed by GitHub
commit adb85530b7
3 changed files with 3 additions and 3 deletions

View File

@ -234,7 +234,7 @@
- name: stop ceph osds on ubuntu - name: stop ceph osds on ubuntu
shell: | 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 initctl stop ceph-osd cluster={{ cluster }} id=$id
done done
failed_when: false failed_when: false

View File

@ -4,7 +4,7 @@
# for restarting them specifically. # for restarting them specifically.
- name: restart ceph osds - name: restart ceph osds
shell: | 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 systemctl restart ceph-osd@$id
sleep 5 sleep 5
done done

View File

@ -1,7 +1,7 @@
--- ---
- name: collect osds - name: collect osds
shell: | shell: |
ls /var/lib/ceph/osd/ |grep -oh '[0-9]*' ls /var/lib/ceph/osd/ |grep -oP '\d+$'
register: osd_ids register: osd_ids
- name: wait for ceph osd socket(s) - name: wait for ceph osd socket(s)