Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSDMonitor: only reject MOSDBoot based on up_from if inst matches #12003

Merged
merged 1 commit into from Nov 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mon/OSDMonitor.cc
Expand Up @@ -2119,7 +2119,8 @@ bool OSDMonitor::preprocess_boot(MonOpRequestRef op)
}

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;
Expand Down
6 changes: 5 additions & 1 deletion src/osd/OSDMap.h
Expand Up @@ -481,9 +481,13 @@ class OSDMap {
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));
Expand Down