]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix for bug #6700 1948/head
authorSteve Taylor <steve@DES-U1404-STETAY.stc.local>
Tue, 10 Jun 2014 18:42:55 +0000 (12:42 -0600)
committerSteve Taylor <steve@DES-U1404-STETAY.stc.local>
Tue, 10 Jun 2014 18:42:55 +0000 (12:42 -0600)
When preparing OSD disks with colocated journals, the intialization process
fails when using dmcrypt. The kernel fails to re-read the partition table after
the storage partition is created because the journal partition is already in use
by dmcrypt. This fix unmaps the journal partition from dmcrypt and allows the
partition table to be read.

Signed-off-by: Stephen F Taylor <steveftaylor@gmail.com>
src/ceph-disk

index 9af749ad9045c0a41abcb691a8078bf2edf00155..d47758ad8e53f488f2ea08bae4c0485598a6c165 100755 (executable)
@@ -1224,6 +1224,9 @@ def prepare_dev(
         LOG.debug('OSD data device %s is a partition', data)
         rawdev = data
     else:
+        if journal_dmcrypt is not None:
+            dmcrypt_unmap(journal)
+
         LOG.debug('Creating osd partition on %s', data)
         try:
             if data_size is None:
@@ -1327,6 +1330,8 @@ def prepare_dev(
     finally:
         if rawdev != dev:
             dmcrypt_unmap(osd_uuid)
+        if journal_dmcrypt is not None:
+            dmcrypt_unmap(journal)
 
     if not is_partition(data):
         try: