]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
osd: fix collocation spelling and declare dmcrypt variables
authorSébastien Han <seb@redhat.com>
Wed, 10 Aug 2016 08:34:23 +0000 (10:34 +0200)
committerSébastien Han <seb@redhat.com>
Thu, 13 Oct 2016 17:02:16 +0000 (19:02 +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>
(cherry picked from commit 673f54a10068f75b1812360d7ebcb7e9889c1150)

Resolves: rhbz#1373736 and rhbz#1366808

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 709b458a585587c2ebc707405417c2cb621eeb66..9ca649dab72f902d58101921269db47af25a64a6 100644 (file)
@@ -316,5 +316,20 @@ dummy:
 # Do not comment the variable mon_containerized_deployment_with_kv here. This variable is being used
 # by ceph.conf.j2 template. so it should always be defined
 #mon_containerized_deployment_with_kv: false
-
+#mon_containerized_deployment: false
+
+
+##################
+# Temporary Vars #
+##################
+# NOTE(SamYaple): These vars are set here to they are defined before use. They
+# should be removed after a refactor has properly seperated all the checks into
+# the appropriate roles.
+
+#journal_collocation: False
+#raw_multi_journal: False
+#osd_directory: False
+#bluestore: False
+#dmcrypt_journal_collocation: False
+#dmcrypt_dedicated_journal: False
 
index b786ba3c14eba04ecc307919d99c6deded96e2a2..a200c40216174f27d573d9a4ce9d44ab203b1439 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 7f970d1699aa285511230ca3b060130c762c214b..63419e9d1eac11eaa4f9555fefce551c6456897b 100644 (file)
@@ -308,4 +308,19 @@ docker: false
 # Do not comment the variable mon_containerized_deployment_with_kv here. This variable is being used
 # by ceph.conf.j2 template. so it should always be defined
 mon_containerized_deployment_with_kv: false
-
+mon_containerized_deployment: false
+
+
+##################
+# Temporary Vars #
+##################
+# NOTE(SamYaple): These vars are set here to they are defined before use. They
+# should be removed after a refactor has properly seperated all the checks into
+# the appropriate roles.
+
+journal_collocation: False
+raw_multi_journal: False
+osd_directory: False
+bluestore: False
+dmcrypt_journal_collocation: False
+dmcrypt_dedicated_journal: False
index 902463143b2ba1a7ca905072e1a3f4c8173f766f..f8404894c50e91a4efc5341f14663356917b4b8c 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 8269f49128fd509039efe44d1b5c3fdf7e5f8c9c..3f8aab69b2897a0fedd4e14d86187aed5da4be70 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 d46e99e298c09976886554bdb6ad50fdc1bc721e..f37c3eb820a3411131ef21cc630d19125c831414 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 316420338fcf765d01e982601cab54037441dfbb..ddd9b8dce4765b0d19d53e5c1c1390a2971aafbf 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 d764a1bb206499c202d963f106678fe0e7e3f22f..4397fcf15b49b785ae9a125593ef0d7456553f82 100644 (file)
@@ -25,7 +25,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