]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Osd: Force filestore and bluestore usage
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 5 Jul 2017 22:01:31 +0000 (00:01 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 12 Jul 2017 09:30:30 +0000 (11:30 +0200)
In Luminous, ceph-disk defaults to bluestore so all our scenarios are
using bluestore, we need to force testing both.

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-osd/tasks/scenarios/dmcrypt-dedicated-journal.yml
roles/ceph-osd/tasks/scenarios/dmcrypt-journal-collocation.yml

index fe0b8e3c50ae47327fffa4c4e1ad139ef0bee749..b78ae73be95ce4eeb5db5c5c851b7fde4239f456 100644 (file)
     - item.0.get("rc", 0) != 0
     - item.1.get("rc", 0) != 0
     - not osd_auto_discovery
+    - osd_objectstore == 'filestore'
+    - dmcrypt_dedicated_journal
+
+- name: prepare dmcrypt osd disk(s) with a dedicated journal device
+  command: "ceph-disk prepare --bluestore --dmcrypt --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
+  with_together:
+    - "{{ parted_results.results }}"
+    - "{{ ispartition_results.results }}"
+    - "{{ devices }}"
+    - "{{ raw_journal_devices }}"
+  changed_when: false
+  when:
+    - not item.0.get("skipped")
+    - not item.1.get("skipped")
+    - item.0.get("rc", 0) != 0
+    - item.1.get("rc", 0) != 0
+    - not osd_auto_discovery
+    - osd_objectstore == 'bluestore'
     - dmcrypt_dedicated_journal
 
 - include: ../activate_osds.yml
index 528856f5b32e6939bdddbf97f25e535396af1cc7..0b097018764b16365808580c7878f679f3b1f491 100644 (file)
@@ -9,7 +9,7 @@
 
 # NOTE (alahouze): if the device is a partition, the parted command below has
 # failed, this is why we check if the device is a partition too.
-- name: automatic prepare dmcrypt osd disk(s) without partitions with collocated osd data and journal
+- name: automatic prepare dmcrypt osd disk(s) without partitions with collocated osd data and journal (filestore)
   command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "/dev/{{ item.key }}"
   with_dict: "{{ ansible_devices }}"
   when:
     - item.value.partitions|count == 0
     - item.value.holders|count == 0
     - dmcrypt_journal_collocation
+    - osd_objectstore == 'filestore'
     - osd_auto_discovery
 
-- name: manually prepare dmcrypt osd disk(s) with collocated osd data and journal
+- name: automatic prepare dmcrypt osd disk(s) without partitions with collocated osd data and journal (bluestore)
+  command: ceph-disk prepare --bluestore --dmcrypt --cluster "{{ cluster }}" "/dev/{{ item.key }}"
+  with_dict: "{{ ansible_devices }}"
+  when:
+    - ansible_devices is defined
+    - item.value.removable == "0"
+    - item.value.partitions|count == 0
+    - item.value.holders|count == 0
+    - dmcrypt_journal_collocation
+    - osd_objectstore == 'bluestore'
+    - osd_auto_discovery
+
+- name: manually prepare dmcrypt osd disk(s) with collocated osd data and journal (filestore)
   command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
   with_together:
     - "{{ parted_results.results }}"
     - item.0.get("rc", 0) != 0
     - item.1.get("rc", 0) != 0
     - dmcrypt_journal_collocation
+    - osd_objectstore == 'filestore'
+    - not osd_auto_discovery
+
+- name: manually prepare dmcrypt osd disk(s) with collocated osd data and journal (bluestore)
+  command: ceph-disk prepare --bluestore --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
+  with_together:
+    - "{{ parted_results.results }}"
+    - "{{ ispartition_results.results }}"
+    - "{{ devices }}"
+  when:
+    - not item.0.get("skipped")
+    - not item.1.get("skipped")
+    - item.0.get("rc", 0) != 0
+    - item.1.get("rc", 0) != 0
+    - dmcrypt_journal_collocation
+    - osd_objectstore == 'bluestore'
     - not osd_auto_discovery
 
 - include: ../activate_osds.yml