summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-29 13:59:04 -0700
committerSage Weil <sage@inktank.com>2013-04-26 13:40:06 -0700
commit0182973b66d449552d17248e27cd12c470137ea9 (patch)
treeef620a9eea4990b6fd7ffc72714a251f983564e3
parent24d729c591430349b033992f87141e596dcd6bff (diff)
downloadceph-0182973b66d449552d17248e27cd12c470137ea9.tar.gz
ceph-disk: handle missing journal_uuid field gracefully
Only lower if we know it's not None. Signed-off-by: Sage Weil <sage@inktank.com> (cherry picked from commit 562e1716bd4b5372716e502a5e4dd872d381bfb7)
-rwxr-xr-xsrc/ceph-disk12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index c1d6a4d2cdc..71c3a75b54d 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -1671,9 +1671,11 @@ def more_osd_info(path, uuid_map):
if who:
desc.append('osd.%s' % who)
- journal_uuid = get_oneliner(path, 'journal_uuid').lower()
- if journal_uuid and journal_uuid in uuid_map:
- desc.append('journal %s' % uuid_map[journal_uuid])
+ journal_uuid = get_oneliner(path, 'journal_uuid')
+ if journal_uuid:
+ journal_uuid = journal_uuid.lower()
+ if journal_uuid in uuid_map:
+ desc.append('journal %s' % uuid_map[journal_uuid])
return desc
@@ -1747,9 +1749,9 @@ def main_list(args):
try:
tpath = mount(dev=dev, fstype=fs, options='')
try:
- journal_uuid = get_oneliner(tpath, 'journal_uuid').lower()
+ journal_uuid = get_oneliner(tpath, 'journal_uuid')
if journal_uuid:
- journal_map[journal_uuid] = dev
+ journal_map[journal_uuid.lower()] = dev
finally:
unmount(tpath)
except: