]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
osd: fix collocation spelling and declare dmcrypt variables 927/head
authorSébastien Han <seb@redhat.com>
Wed, 10 Aug 2016 08:34:23 +0000 (10:34 +0200)
committerSébastien Han <seb@redhat.com>
Wed, 10 Aug 2016 08:34:23 +0000 (10:34 +0200)
* changed s/colocation/collocation/
* declare dmcrypt variable in ceph-common so the variables check does
not fail

Signed-off-by: Sébastien Han <seb@redhat.com>
group_vars/all.sample
group_vars/osds.sample
roles/ceph-common/defaults/main.yml
roles/ceph-common/tasks/checks/check_mandatory_vars.yml
roles/ceph-osd/defaults/main.yml
roles/ceph-osd/tasks/activate_osds.yml
roles/ceph-osd/tasks/main.yml
roles/ceph-osd/tasks/pre_requisite.yml
roles/ceph-osd/tasks/scenarios/dmcrypt-journal-collocation.yml [new file with mode: 0644]
roles/ceph-osd/tasks/scenarios/dmcrypt-journal-colocation.yml [deleted file]

index d9732ab4c46d3c0b2e354c0779f5e9a4072fdfd2..941a2da9925b54af39b650974e95d838d87aa17b 100644 (file)
@@ -352,6 +352,8 @@ dummy:
 #raw_multi_journal: False
 #osd_directory: False
 #bluestore: False
+#dmcrypt_journal_collocation: False
+#dmcrypt_dedicated_journal: False
 
 #osd_auto_discovery: False
 
index b2241ba04f8ac4810bec6fb399ab3301268a7820..f04ddbd4737a881e4db11ca1bc43271886b812c4 100644 (file)
@@ -121,7 +121,7 @@ dummy:
 # Keys are stored into the monitors k/v store
 # Use 'true' to enable this scenario
 # Both journal and data are stored on the same dm-crypt encrypted device
-#dmcrypt_journal_colocation: false
+#dmcrypt_journal_collocation: false
 
 
 # VI. Encrypt osd data and/or journal devices with dm-crypt.
index aefdd012b7abcff5ad5570e43414738a8b4b3fa4..bfc5d023b25ca0b0188ea31839a4ad5a0fd67f15 100644 (file)
@@ -344,5 +344,7 @@ journal_collocation: False
 raw_multi_journal: False
 osd_directory: False
 bluestore: False
+dmcrypt_journal_collocation: False
+dmcrypt_dedicated_journal: False
 
 osd_auto_discovery: False
index 4ab6dd1f39888681e0399ca2fb4f874fb4412ada..499d593c0f4fa8e2f3bb3289cba779e78085377a 100644 (file)
@@ -71,7 +71,7 @@
     - not raw_multi_journal
     - not osd_directory
     - not bluestore
-    - not dmcrypt_journal_colocation
+    - not dmcrypt_journal_collocation
     - not dmcrypt_dedicated_journal
 
 - name: verify only one osd scenario was chosen
       or (raw_multi_journal and osd_directory)
       or (raw_multi_journal and bluestore)
       or (osd_directory and bluestore)
-      or (dmcrypt_journal_colocation and journal_collocation)
-      or (dmcrypt_journal_colocation and raw_multi_journal)
-      or (dmcrypt_journal_colocation and osd_directory)
-      or (dmcrypt_journal_colocation and bluestore)
+      or (dmcrypt_journal_collocation and journal_collocation)
+      or (dmcrypt_journal_collocation and raw_multi_journal)
+      or (dmcrypt_journal_collocation and osd_directory)
+      or (dmcrypt_journal_collocation and bluestore)
       or (dmcrypt_dedicated_journal and journal_collocation)
       or (dmcrypt_dedicated_journal and raw_multi_journal)
       or (dmcrypt_dedicated_journal and osd_directory)
       or (dmcrypt_dedicated_journal and bluestore)
+      or (dmcrypt_dedicated_journal and dmcrypt_journal_collocation)
 
 - name: verify devices have been provided
   fail:
index f2927b56ec7ea3e1f920f47f633081db64db4fc7..97002b1f5c0a7f14e9a5f1c23614a0869c6e98e6 100644 (file)
@@ -113,7 +113,7 @@ bluestore: false
 # Keys are stored into the monitors k/v store
 # Use 'true' to enable this scenario
 # Both journal and data are stored on the same dm-crypt encrypted device
-dmcrypt_journal_colocation: false
+dmcrypt_journal_collocation: false
 
 
 # VI. Encrypt osd data and/or journal devices with dm-crypt.
index 4219e005ffed66c39f90d5530d610f7ac80910aa..6a9724a971e2dd735fcb6d293b5b3d30fee9a375 100644 (file)
@@ -36,7 +36,7 @@
     - item.value.removable == "0"
     - item.value.partitions|count == 0
     - osd_auto_discovery
-    - dmcrypt_journal_colocation
+    - dmcrypt_journal_collocation
 
 - name: activate osd(s) when device is a disk (dmcrypt)
   command: ceph-disk activate --dmcrypt {{ item.1 | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1
@@ -56,7 +56,7 @@
 # https://github.com/ansible/ansible/issues/4297
 - name: combine ispartition results
   set_fact:
-    combined_activate_osd_disk_results: "{{ activate_osd_disk if not dmcrypt_journal_colocation else activate_osd_disk_dmcrypt }}"
+    combined_activate_osd_disk_results: "{{ activate_osd_disk if not dmcrypt_journal_collocation else activate_osd_disk_dmcrypt }}"
 
 - name: fail if ceph-disk cannot create an OSD
   fail:
index d965a558c86cf7e86a01bc4621a85bbb9a67f095..4550816b6f4daa547b40f9dee9839356292c647d 100644 (file)
@@ -22,9 +22,9 @@
     - osd_objectstore == 'bluestore'
     - not osd_containerized_deployment
 
-- include: ./scenarios/dmcrypt-journal-colocation.yml
+- include: ./scenarios/dmcrypt-journal-collocation.yml
   when:
-    - dmcrypt_journal_colocation
+    - dmcrypt_journal_collocation
     - not osd_containerized_deployment
 
 - include: ./scenarios/dmcrypt-dedicated-journal.yml
index 9e2afda17ad03c76038755bc874f92cb534f2d45..4941471b399d60ed0a1d3448c053ceab24e67ea3 100644 (file)
@@ -35,7 +35,7 @@
   set_fact:
     copy_admin_key: true
   when:
-    - dmcrypt_journal_colocation or dmcrypt_dedicated_journal
+    - dmcrypt_journal_collocation or dmcrypt_dedicated_journal
 
 - name: copy osd bootstrap key
   copy:
diff --git a/roles/ceph-osd/tasks/scenarios/dmcrypt-journal-collocation.yml b/roles/ceph-osd/tasks/scenarios/dmcrypt-journal-collocation.yml
new file mode 100644 (file)
index 0000000..91057b5
--- /dev/null
@@ -0,0 +1,36 @@
+---
+## SCENARIO 5: DMCRYPT
+
+- include: ../check_devices.yml
+
+# NOTE (leseb): the prepare process must be parallelized somehow...
+# if you have 64 disks with 4TB each, this will take a while
+# since Ansible will sequential process the loop
+
+# 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 osd disk(s) without partitions (dmcrypt)
+  command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "/dev/{{ item.key }}"
+  with_dict: ansible_devices
+  when:
+    - ansible_devices is defined
+    - item.value.removable == "0"
+    - item.value.partitions|count == 0
+    - dmcrypt_journal_collocation
+    - osd_auto_discovery
+
+- name: manually prepare osd disk(s) (dmcrypt)
+  command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
+  with_together:
+    - combined_parted_results.results
+    - combined_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
+    - not osd_auto_discovery
+
+- include: ../activate_osds.yml
diff --git a/roles/ceph-osd/tasks/scenarios/dmcrypt-journal-colocation.yml b/roles/ceph-osd/tasks/scenarios/dmcrypt-journal-colocation.yml
deleted file mode 100644 (file)
index 534fd3c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
----
-## SCENARIO 5: DMCRYPT
-
-- include: ../check_devices.yml
-
-# NOTE (leseb): the prepare process must be parallelized somehow...
-# if you have 64 disks with 4TB each, this will take a while
-# since Ansible will sequential process the loop
-
-# 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 osd disk(s) without partitions (dmcrypt)
-  command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "/dev/{{ item.key }}"
-  with_dict: ansible_devices
-  when:
-    - ansible_devices is defined
-    - item.value.removable == "0"
-    - item.value.partitions|count == 0
-    - dmcrypt_journal_colocation
-    - osd_auto_discovery
-
-- name: manually prepare osd disk(s) (dmcrypt)
-  command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
-  with_together:
-    - combined_parted_results.results
-    - combined_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_colocation
-    - not osd_auto_discovery
-
-- include: ../activate_osds.yml