]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix call to get_uuid() on non-existant osd
authorSage Weil <sage@newdream.net>
Fri, 4 May 2012 23:02:00 +0000 (16:02 -0700)
committerSage Weil <sage@newdream.net>
Fri, 4 May 2012 23:02:00 +0000 (16:02 -0700)
Didn't catch this with vstart.sh testing.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/OSDMonitor.cc

index 32be93a221b90e1d56fe6d33f59676ce6285010e..ce33343f225411e7aa75468dc0c5ccdc2fdf70cc 100644 (file)
@@ -814,7 +814,7 @@ bool OSDMonitor::prepare_boot(MOSDBoot *m)
 
     // set uuid?
     dout(10) << " setting osd." << from << " uuid to " << m->sb.osd_fsid << dendl;
-    if (osdmap.get_uuid(from) != m->sb.osd_fsid)
+    if (!osdmap.exists(from) || osdmap.get_uuid(from) != m->sb.osd_fsid)
       pending_inc.new_uuid[from] = m->sb.osd_fsid;
 
     // fresh osd?