Problem: too many different commands to do the same thing. The 'cut'
command on infrastructure-playbooks/purge-cluster.yml was also wrong.
This sed command from osixia in ceph-docker
https://github.com/ceph/ceph-docker/pull/580/ addresses all the
scenarios.
Signed-off-by: Sébastien Han <seb@redhat.com>
# for restarting them specifically.
- name: restart ceph osds
shell: |
- for id in $(ls /var/lib/ceph/osd/ |grep -oP '\d+$'); do
+ for id in $(ls /var/lib/ceph/osd/ | sed 's/.*-//'); do
systemctl restart ceph-osd@$id
sleep 5
done
---
- name: collect osds
shell: |
- ls /var/lib/ceph/osd/ |grep -oP '\d+$'
+ ls /var/lib/ceph/osd/ | sed 's/.*-//'
register: osd_ids
- name: wait for ceph osd socket(s)