From 6679c27459659d99b6c814dd6c49d67cf809861a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 7 Oct 2010 16:09:25 -0700 Subject: [PATCH] osd: move to boot state if down OR wrong address in map 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 --- src/osd/OSD.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index cf821f98d6706..69dd1799e574d 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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; -- 2.39.5