If we have a real addr for hb_front for a given osd and then a new map
has the osd coming up without an hb_front, we need to clear the addr
field.
Also, improve the debug output in add_heartbeat_peer() so we can tell if
we have no connection or a connection to a blank addr.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
if (cons.second) {
hi->con_front = cons.second.get();
hi->con_front->set_priv(s->get());
+ dout(10) << "_add_heartbeat_peer: new peer osd." << p
+ << " " << hi->con_back->get_peer_addr()
+ << " " << hi->con_front->get_peer_addr()
+ << dendl;
+ } else {
+ hi->con_front.reset(NULL);
+ dout(10) << "_add_heartbeat_peer: new peer osd." << p
+ << " " << hi->con_back->get_peer_addr()
+ << dendl;
}
- dout(10) << "_add_heartbeat_peer: new peer osd." << p
- << " " << hi->con_back->get_peer_addr()
- << " " << (hi->con_front ? hi->con_front->get_peer_addr() : entity_addr_t())
- << dendl;
} else {
hi = &i->second;
}
if (!inc.new_hb_front_up.empty())
osd_addrs->hb_front_addr[i->first].reset(
new entity_addr_t(inc.new_hb_front_up.find(i->first)->second));
+ else
+ osd_addrs->hb_front_addr[i->first].reset();
+
osd_info[i->first].up_from = epoch;
}
for (map<int32_t,entity_addr_t>::const_iterator i = inc.new_up_cluster.begin();