]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-osd: Fix osd start sequence 1800/head
authorBoris Ranto <branto@redhat.com>
Wed, 23 Aug 2017 22:23:25 +0000 (00:23 +0200)
committerBoris Ranto <branto@redhat.com>
Fri, 25 Aug 2017 11:40:04 +0000 (13:40 +0200)
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 <branto@redhat.com>
roles/ceph-osd/tasks/start_osds.yml

index 19e4c390a674698666e984de15ab8d0e8955bdfa..f2b78a2b61b6f2f4a684b34d48588a621d362218 100644 (file)
@@ -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