]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix for bug #6700
authorSteve Taylor <steve@DES-U1404-STETAY.stc.local>
Tue, 10 Jun 2014 18:42:55 +0000 (12:42 -0600)
committerAlfredo Deza <alfredo.deza@inktank.com>
Fri, 13 Jun 2014 16:14:48 +0000 (12:14 -0400)
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>
(cherry picked from commit 673394702b725ff3f26d13b54d909208daa56d89)

src/ceph-disk

index d2f042e2289c46a6fb54b6016a5e0ab92b929d09..08286c1012c7e1ded77fb9389651918b25740371 100755 (executable)
@@ -1182,6 +1182,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:
             command_check_call(
@@ -1263,6 +1266,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: