From: Sébastien Han Date: Thu, 29 Jun 2017 14:52:33 +0000 (+0200) Subject: osd: remove redundant options to enable bluestore X-Git-Tag: v2.3.0rc2~11^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fc0e54c59efb41d9bf0bce239fb997f75ac66e85;p=ceph-ansible.git osd: remove redundant options to enable bluestore There is no need for 2 variables to enable bluestore, prior to this patch one had to do the following to activate bluestore: osd_objectstore: bluestore bluestore: true Now you just need to set `osd_objectstore: bluestore`. Fixes: https://github.com/ceph/ceph-ansible/issues/1475 Signed-off-by: Sébastien Han --- diff --git a/group_vars/osds.yml.sample b/group_vars/osds.yml.sample index 9e96266fc..7b2dcbfb0 100644 --- a/group_vars/osds.yml.sample +++ b/group_vars/osds.yml.sample @@ -135,7 +135,8 @@ dummy: # IV. This will partition disks for BlueStore # Use 'true' to enable this scenario -#bluestore: false +# To enable bluestore just set: +# osd_objectstore: bluestore # V. Encrypt osd data and/or journal devices with dm-crypt. diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index 03e26d3bd..4779c3db2 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -127,7 +127,8 @@ raw_journal_devices: [] # IV. This will partition disks for BlueStore # Use 'true' to enable this scenario -bluestore: false +# To enable bluestore just set: +# osd_objectstore: bluestore # V. Encrypt osd data and/or journal devices with dm-crypt. diff --git a/roles/ceph-osd/tasks/check_mandatory_vars.yml b/roles/ceph-osd/tasks/check_mandatory_vars.yml index da8b23b01..c09105923 100644 --- a/roles/ceph-osd/tasks/check_mandatory_vars.yml +++ b/roles/ceph-osd/tasks/check_mandatory_vars.yml @@ -28,7 +28,7 @@ - not containerized_deployment - not journal_collocation - not raw_multi_journal - - not bluestore + - osd_objectstore != 'bluestore' - not dmcrypt_journal_collocation - not dmcrypt_dedicated_journal @@ -40,14 +40,14 @@ - osd_group_name in group_names - not containerized_deployment - (journal_collocation and raw_multi_journal) - or (journal_collocation and bluestore) - or (raw_multi_journal and bluestore) + or (journal_collocation and osd_objectstore == 'bluestore') + or (raw_multi_journal and osd_objectstore == 'bluestore') or (dmcrypt_journal_collocation and journal_collocation) or (dmcrypt_journal_collocation and raw_multi_journal) - or (dmcrypt_journal_collocation and bluestore) + or (dmcrypt_journal_collocation and osd_objectstore == 'bluestore') or (dmcrypt_dedicated_journal and journal_collocation) or (dmcrypt_dedicated_journal and raw_multi_journal) - or (dmcrypt_dedicated_journal and bluestore) + or (dmcrypt_dedicated_journal and osd_objectstore == 'bluestore') or (dmcrypt_dedicated_journal and dmcrypt_journal_collocation) - name: verify devices have been provided @@ -71,3 +71,10 @@ - raw_journal_devices|length == 0 or devices|length == 0 +- name: check if bluestore is supported by the selection ceph version + fail: + msg: "Bluestore is not supported with the selected Ceph version, use Luminous and above." + when: + - osd_objectstore != 'bluestore' + - osd_group_name in group_names + - ( ceph_release_num.{{ ceph_release }} < ceph_release_num.luminous ) }} ) diff --git a/roles/ceph-osd/tasks/scenarios/bluestore.yml b/roles/ceph-osd/tasks/scenarios/bluestore.yml index 78897e288..4cb1b3f5a 100644 --- a/roles/ceph-osd/tasks/scenarios/bluestore.yml +++ b/roles/ceph-osd/tasks/scenarios/bluestore.yml @@ -18,7 +18,7 @@ - item.value.removable == "0" - item.value.partitions|count == 0 - item.value.holders|count == 0 - - bluestore + - osd_objectstore == 'bluestore' - osd_auto_discovery - name: manually prepare bluestore osd disk(s) @@ -32,7 +32,7 @@ - not item.1.get("skipped") - item.0.get("rc", 0) != 0 - item.1.get("rc", 0) != 0 - - bluestore + - osd_objectstore == 'bluestore' - not osd_auto_discovery - include: ../activate_osds.yml