If the osd actually restarts, there is no guarrantee that the epoch will
advance past up_from. If the inst is different, it can't really be a
dup. At worst, it might be a queued MOSDBoot from a previous inst, but
in that case, the real inst would see itself marked up, and then back
down causing it to try booting again.
Fixes: http://tracker.ceph.com/issues/17899
Signed-off-by: Samuel Just <sjust@redhat.com>
}
if (osdmap.exists(from) &&
- osdmap.get_info(from).up_from > m->version) {
+ osdmap.get_info(from).up_from > m->version &&
+ osdmap.get_most_recent_inst(from) == m->get_orig_source_inst()) {
dout(7) << "prepare_boot msg from before last up_from, ignoring" << dendl;
send_latest(op, m->sb.current_epoch+1);
return true;
assert(exists(osd));
return osd_addrs->hb_front_addr[osd] ? *osd_addrs->hb_front_addr[osd] : osd_addrs->blank;
}
+ entity_inst_t get_most_recent_inst(int osd) const {
+ assert(exists(osd));
+ return entity_inst_t(entity_name_t::OSD(osd), get_addr(osd));
+ }
entity_inst_t get_inst(int osd) const {
assert(is_up(osd));
- return entity_inst_t(entity_name_t::OSD(osd), get_addr(osd));
+ return get_most_recent_inst(osd);
}
entity_inst_t get_cluster_inst(int osd) const {
assert(is_up(osd));