From: Boris Ranto Date: Wed, 23 Aug 2017 22:23:25 +0000 (+0200) Subject: ceph-osd: Fix osd start sequence X-Git-Tag: v3.0.0rc8~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5f1b8fcd75f5171349c2f71d90f9bf9fc8e1e537;p=ceph-ansible.git ceph-osd: Fix osd start sequence The script can fail to get the osd id because the osds are activated by udev and it can take a while for them to activate. This commit fixes that by trying to get all the osds per node in a loop. This commit also makes the osd services enabled so that they are available after reboot. Signed-off-by: Boris Ranto --- diff --git a/roles/ceph-osd/tasks/start_osds.yml b/roles/ceph-osd/tasks/start_osds.yml index 19e4c390a..f2b78a2b6 100644 --- a/roles/ceph-osd/tasks/start_osds.yml +++ b/roles/ceph-osd/tasks/start_osds.yml @@ -9,6 +9,8 @@ failed_when: false always_run: true register: osd_id + until: osd_id.stdout_lines|length == devices|unique|length + retries: 10 - name: ensure systemd service override directory exists file: @@ -32,5 +34,6 @@ service: name: ceph-osd@{{ item }} state: started + enabled: true with_items: "{{ (osd_id|default({})).stdout_lines|default([]) }}" changed_when: false