]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: move to boot state if down OR wrong address in map
authorSage Weil <sage@newdream.net>
Thu, 7 Oct 2010 23:09:25 +0000 (16:09 -0700)
committerSage Weil <sage@newdream.net>
Thu, 7 Oct 2010 23:17:09 +0000 (16:17 -0700)
Saw an OSD that was up in the map, but the address didn't match.  Caused
all kinds of strange behavior.  I'm not sure what I had in mind when the
original test only checked for down AND same address before moving to boot
state, since having the wrong address is clearly bad news.

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

index cf821f98d670669eb9f72a7af806ad4d57dc7bfb..69dd1799e574d9bd3525b8f1f01a1e1f3947c506 100644 (file)
@@ -2526,8 +2526,9 @@ void OSD::handle_osd_map(MOSDMap *m)
   if (osdmap->get_epoch() > 0 &&
       state != STATE_BOOTING &&
       (!osdmap->exists(whoami) || 
-       (!osdmap->is_up(whoami) && osdmap->get_addr(whoami) == client_messenger->get_myaddr()))) {
-    dout(0) << "map says i am down.  switching to boot state." << dendl;
+       !osdmap->is_up(whoami) ||
+       osdmap->get_addr(whoami) != client_messenger->get_myaddr())) {
+    dout(0) << "map says i am down or have a different address.  switching to boot state." << dendl;
     //shutdown();
 
     stringstream ss;