From: Sage Weil Date: Thu, 8 Oct 2015 16:12:34 +0000 (-0400) Subject: mon/PGMonitor: only send pg create messages to up osds X-Git-Tag: v10.0.1~26^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ad0c9215f667732eea45034a7e81de2cd33eb40;p=ceph.git mon/PGMonitor: only send pg create messages to up osds If the OSD is down it will ignore the message. If it gets marked up, we will eventually consume that map and call check_subs(). Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 0a0d48eed5fb..0e305d9fc9ea 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -2357,6 +2357,7 @@ void PGMonitor::check_subs() while (!p.end()) { Subscription *sub = *p; ++p; + dout(20) << __func__ << " .. " << sub->session->inst << dendl; check_sub(sub); } } @@ -2364,8 +2365,13 @@ void PGMonitor::check_subs() void PGMonitor::check_sub(Subscription *sub) { if (sub->type == "osd_pg_creates") { - sub->next = send_pg_creates(sub->session->inst.name.num(), - sub->session->con.get(), - sub->next); + // only send these if the OSD is up. we will check_subs() when they do + // come up so they will get the creates then. + if (sub->session->inst.name.is_osd() && + mon->osdmon()->osdmap.is_up(sub->session->inst.name.num())) { + sub->next = send_pg_creates(sub->session->inst.name.num(), + sub->session->con.get(), + sub->next); + } } }