]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: a journal partition may survive a data partition
authorLoic Dachary <ldachary@redhat.com>
Sun, 20 Sep 2015 12:00:16 +0000 (14:00 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 22 Sep 2015 06:46:56 +0000 (08:46 +0200)
When a data partition is removed and the journal partition is not
removed, ceph-disk list will not find a journal_for information and
should just ignore it.

http://tracker.ceph.com/issues/13157 Fixes: #13157

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/ceph-disk

index 0071fdb8ea2724f2342bb8d079e90112001975d4..55319f9fe40960111fad4c4e3fac8d1e85bdf467 100755 (executable)
@@ -2775,7 +2775,7 @@ def list_format_dev_plain(dev, devices=[], prefix=''):
             desc = ['ceph data (dmcrypt %s)' % dmcrypt['type'], 'holders: ' + ','.join(dmcrypt['holders'])]
     elif dev['ptype'] == JOURNAL_UUID:
         desc.append('ceph journal')
-        if dev['journal_for']:
+        if dev.get('journal_for'):
             desc.append('for %s' % dev['journal_for'])
     elif dev['ptype'] in (DMCRYPT_JOURNAL_UUID,
                           DMCRYPT_LUKS_JOURNAL_UUID):