]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
lvm: update scenario for new osd_scenario variable
authorAndrew Schoen <aschoen@redhat.com>
Thu, 3 Aug 2017 15:08:34 +0000 (10:08 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 4 Aug 2017 11:38:36 +0000 (06:38 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
docs/source/osds/scenarios.rst
group_vars/osds.yml.sample
roles/ceph-osd/defaults/main.yml
roles/ceph-osd/tasks/check_mandatory_vars.yml
roles/ceph-osd/tasks/main.yml
roles/ceph-osd/tasks/start_osds.yml
tests/functional/centos/7/lvm-osds/group_vars/all

index 03c46a2d1cd547aa261d5cdf202a209b54bd4dcb..6ba834c1d9aa2a73f7607664431580510d25df97 100644 (file)
@@ -1,26 +1,28 @@
 OSD Scenarios
 =============
 
-lvm_osds
---------
+lvm
+---
 This OSD scenario uses ``ceph-volume`` to create OSDs from logical volumes and
-is only available when the ceph release is Luminous or greater.
+is only available when the ceph release is Luminous or newer.
 
 .. note::
-   The creation of the logical volumes is not supported by ceph-ansible, ceph-volume
+   The creation of the logical volumes is not supported by ``ceph-ansible``, ``ceph-volume``
    only creates OSDs from existing logical volumes.
 
-Use ``lvm_osds:true`` to enable this scenario. Currently we only support dedicated journals
+Use ``osd_scenario: lvm`` to enable this scenario. Currently we only support dedicated journals
 when using lvm, not collocated journals.
 
 To configure this scenario use the ``lvm_volumes`` config option. ``lvm_volumes``  is a dictionary whose
 key/value pairs represent a data lv and a journal pair. Journals can be either a lv, device or partition.
 You can not use the same journal for many data lvs.
 
-For example, a configuration to use ``lvm_osds`` would look like::
-    
-    lvm_osds: true
+.. note::
+   Any logical volume or logical group used in ``lvm_volumes`` must be a name and not a path.
 
+For example, a configuration to use the ``lvm`` osd scenario would look like::
+    
+    osd_scenario: lvm
     lvm_volumes:
       data-lv1: journal-lv1
       data-lv2: /dev/sda
index 67bff173aa86184aacdd6475eebf89b92cd985e0..2cf8e129298b00b2e258e963f6aa4a1a5739bb32 100644 (file)
@@ -114,6 +114,7 @@ dummy:
 #valid_osd_scenarios:
 #  - collocated
 #  - non-collocated
+#  - lvm
 
 
 # II.  Second scenario: non-collocated
@@ -195,8 +196,8 @@ dummy:
 # /dev/sdc1: PARTLABEL="ceph block.wal" PARTUUID="824b84ba-6777-4272-bbbd-bfe2a25cecf3"
 #bluestore_wal_devices: "{{ dedicated_devices }}"
 
-# VII. Use ceph-volume to create OSDs from logical volumes.
-# Use 'lvm_osds:true' to enable this scenario. Currently we only support dedicated journals
+# III. Use ceph-volume to create OSDs from logical volumes.
+# Use 'osd_scenario: lvm' to enable this scenario. Currently we only support dedicated journals
 # when using lvm, not collocated journals.
 # lvm_volumes is a dictionary whose key/value pair represent a data lv and a journal pair.
 # Journals can be either a lv, device or partition. You can not use the same journal for many data lvs.
@@ -205,7 +206,6 @@ dummy:
 #   data-lv1: journal-lv1
 #   data-lv2: /dev/sda
 #   data:lv3: /dev/sdb1
-#lvm_osds: false
 #lvm_volumes: {}
 
 
index fe4283450ae1f618c20394b1dcf559d4485df93c..30a087cf6c3814e2ee4ecdddf109a37bc14ec8e6 100644 (file)
@@ -106,6 +106,7 @@ osd_scenario: dummy
 valid_osd_scenarios:
   - collocated
   - non-collocated
+  - lvm
 
 
 # II.  Second scenario: non-collocated
@@ -187,17 +188,17 @@ dedicated_devices: []
 # /dev/sdc1: PARTLABEL="ceph block.wal" PARTUUID="824b84ba-6777-4272-bbbd-bfe2a25cecf3"
 bluestore_wal_devices: "{{ dedicated_devices }}"
 
-# VII. Use ceph-volume to create OSDs from logical volumes.
-# Use 'lvm_osds:true' to enable this scenario. Currently we only support dedicated journals
+# III. Use ceph-volume to create OSDs from logical volumes.
+# Use 'osd_scenario: lvm' to enable this scenario. Currently we only support dedicated journals
 # when using lvm, not collocated journals.
 # lvm_volumes is a dictionary whose key/value pair represent a data lv and a journal pair.
+# Any logical volume or logical group used must be a name and not a path.
 # Journals can be either a lv, device or partition. You can not use the same journal for many data lvs.
 # For example:
 # lvm_volumes:
 #   data-lv1: journal-lv1
 #   data-lv2: /dev/sda
 #   data:lv3: /dev/sdb1
-lvm_osds: false
 lvm_volumes: {}
 
 
index 0cd1ddbf36244af7659f9fd693101a253e6a01bb..516542c0ad41a3fc42f1e0b689ef166a38a9ba1b 100644 (file)
     - not osd_auto_discovery
     - devices|length == 0
 
-- name: check if lvm_osds is supported by the selected ceph version
+- name: check if osd_scenario lvm is supported by the selected ceph version
   fail:
-    msg: "lvm_osds is not supported by the selected Ceph version, use Luminous or above."
+    msg: "osd_scenario lvm is not supported by the selected Ceph version, use Luminous or newer."
   when:
     - osd_group_name is defined
     - osd_group_name in group_names
     - not containerized_deployment
-    - lvm_osds
+    - osd_scenario == "lvm"
     - ceph_release_num.{{ ceph_release }} < ceph_release_num.luminous
 
-- name: verify osd_objectstore is 'filestore' when using lvm_osds
+- name: verify osd_objectstore is 'filestore' when using the lvm osd_scenario
   fail:
-    msg: "the lvm_osds scenario currently only works for filestore, not bluestore"
+    msg: "the lvm osd_scenario currently only works for filestore, not bluestore"
   when:
     - osd_group_name is defined
     - osd_group_name in group_names
-    - lvm_osds
+    - osd_scenario == "lvm"
     - not osd_auto_discovery
     - osd_objectstore != 'filestore'
 
@@ -72,7 +72,7 @@
   when:
     - osd_group_name is defined
     - osd_group_name in group_names
-    - lvm_osds
+    - osd_scenario == "lvm"
     - not osd_auto_discovery
     - lvm_volumes|length == 0
 
@@ -83,7 +83,7 @@
     - osd_group_name is defined
     - osd_group_name in group_names
     - not osd_auto_discovery
-    - lvm_osds
+    - osd_scenario == "lvm"
     - lvm_volumes is not mapping
 
 - name: make sure the devices variable is a list
index 2dc9d5e84ca79c024eed15e97515793aed0eaac8..1784e27fc5f4738a49fff4dee28903394d1a0f1c 100644 (file)
@@ -23,7 +23,7 @@
 - name: create lvm osds with ceph-volume
   include: ./scenarios/lvm.yml
   when:
-    - lvm_osds
+    - osd_scenario == 'lvm'
     - not containerized_deployment
   # Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
   static: False
index 4b2e1fcadebd27ed206b1385eecdf393ceacb24a..b0978fc812e2f2e91766a551d2ebdbcb6265ebdf 100644 (file)
@@ -10,7 +10,7 @@
   always_run: true
   register: osd_id
 
-- name: start and add that the osd service(s) to the init sequence
+- name: ensure osd daemons are started
   service:
     name: ceph-osd@{{ item }}
     state: started
index d3fe977ee6eb7d31b6117d2efd77a73a38847715..36d6bbf7b53fd9670ba17edca041b36f1cbeb30f 100644 (file)
@@ -7,7 +7,7 @@ cluster_network: "192.168.4.0/24"
 monitor_interface: eth1
 journal_size: 100
 osd_objectstore: "filestore"
-lvm_osds: true
+osd_scenario: lvm
 copy_admin_key: true
 # test-volume is created by tests/functional/lvm_setup.yml from /dev/sda
 lvm_volumes: