]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Correct the logic for running 'ceph-disk prepare' 287/head
authorBryan Stillwell <bryan.stillwell@twcable.com>
Thu, 25 Jun 2015 20:29:49 +0000 (14:29 -0600)
committerBryan Stillwell <bryan.stillwell@twcable.com>
Thu, 25 Jun 2015 20:29:49 +0000 (14:29 -0600)
The logic was broken here for repeated runs.  We only want to run
'ceph-disk prepare' when the disk does not contain a ceph partition, is
not a partition, and raw_multi_journal is set.  Previously it would
attempt to run 'ceph-disk prepare' when there was a ceph partition
because the second half of the 'or' was still true since it isn't a
partition.

roles/ceph-osd/tasks/raw_multi_journal.yml

index bc07b5162679998b8b190eb2e239c1e2ef1acdd6..b63263750a458ca9c147c9c927bec59b5789499c 100644 (file)
@@ -12,7 +12,9 @@
 # failed, this is why we check if the device is a partition too.
 - name: prepare OSD disk(s)
   command: "ceph-disk prepare {{ item.2 }} {{ item.3 }}"
-  when: (item.0.rc != 0 or item.1.rc != 0) and raw_multi_journal
+  when: item.0.rc != 0 and
+        item.1.rc != 0 and
+        raw_multi_journal
   ignore_errors: True
   with_together:
     - parted.results