]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
lvm_osds: ensure osd daemons are started
authorAndrew Schoen <aschoen@redhat.com>
Tue, 25 Jul 2017 21:48:13 +0000 (16:48 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 4 Aug 2017 11:13:09 +0000 (06:13 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/ceph-osd/tasks/activate_osds.yml
roles/ceph-osd/tasks/main.yml
roles/ceph-osd/tasks/start_osds.yml [new file with mode: 0644]

index 79b99c1394f4ee891625d33209dde9fcb687c5b6..f420dfdafa9ab96d4d21d8dda576f2d49501ba9e 100644 (file)
     - not item.0.get("skipped")
     - item.0.get("rc", 0) == 0
     - not osd_auto_discovery
-
-- include: osd_fragment.yml
-  when: crush_location
-
-- name: get osd id
-  shell: |
-    ls /var/lib/ceph/osd/ | sed 's/.*-//'
-  changed_when: false
-  failed_when: false
-  always_run: true
-  register: osd_id
-
-- name: start and add that the osd service(s) to the init sequence
-  service:
-    name: ceph-osd@{{ item }}
-    state: started
-  with_items: "{{ (osd_id|default({})).stdout_lines|default([]) }}"
-  changed_when: false
index 299d7f9332acff75cd8d338d89f0452e31102a30..56d4c7d201ca368a5b8575cbacf8350e8d5aabc8 100644 (file)
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False
 
+- name: ensure OSD daemons are started
+  include: start_osds.yml
+  when:
+    - not containerized_deployment
+  # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
+  static: False
+
 - include: ./docker/main.yml
   when: containerized_deployment
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
diff --git a/roles/ceph-osd/tasks/start_osds.yml b/roles/ceph-osd/tasks/start_osds.yml
new file mode 100644 (file)
index 0000000..207902d
--- /dev/null
@@ -0,0 +1,19 @@
+---
+
+- include: osd_fragment.yml
+  when: crush_location
+
+- name: get osd id
+  shell: |
+    ls /var/lib/ceph/osd/ | sed 's/.*-//'
+  changed_when: false
+  failed_when: false
+  always_run: true
+  register: osd_id
+
+- name: start and add that the osd service(s) to the init sequence
+  service:
+    name: ceph-osd@{{ item }}
+    state: started
+  with_items: "{{ (osd_id|default({})).stdout_lines|default([]) }}"
+  changed_when: false