mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
mon/OSDMonitor: do not clobber pending xinfo during boot
If we have a pending xinfo change and also process a boot message, we should not throw out the pending xinfo change. This triggers when you mark an osd down and it sends both a MOSDMarkMeDead and a new MOSDBoot message in quick succession: the first message sets dead_epoch but the boot message processing clobbers it. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
b75e17159b
commit
7f89617b64
@ -3202,7 +3202,9 @@ bool OSDMonitor::prepare_boot(MonOpRequestRef op)
|
||||
pair<epoch_t,epoch_t>(begin, end);
|
||||
}
|
||||
|
||||
osd_xinfo_t xi = osdmap.get_xinfo(from);
|
||||
if (pending_inc.new_xinfo.count(from) == 0)
|
||||
pending_inc.new_xinfo[from] = osdmap.osd_xinfo[from];
|
||||
osd_xinfo_t& xi = pending_inc.new_xinfo[from];
|
||||
if (m->boot_epoch == 0) {
|
||||
xi.laggy_probability *= (1.0 - g_conf()->mon_osd_laggy_weight);
|
||||
xi.laggy_interval *= (1.0 - g_conf()->mon_osd_laggy_weight);
|
||||
@ -3237,8 +3239,8 @@ bool OSDMonitor::prepare_boot(MonOpRequestRef op)
|
||||
(g_conf()->mon_osd_auto_mark_new_in && (oldstate & CEPH_OSD_NEW)) ||
|
||||
(g_conf()->mon_osd_auto_mark_in)) {
|
||||
if (can_mark_in(from)) {
|
||||
if (osdmap.osd_xinfo[from].old_weight > 0) {
|
||||
pending_inc.new_weight[from] = osdmap.osd_xinfo[from].old_weight;
|
||||
if (xi.old_weight > 0) {
|
||||
pending_inc.new_weight[from] = xi.old_weight;
|
||||
xi.old_weight = 0;
|
||||
} else {
|
||||
pending_inc.new_weight[from] = CEPH_OSD_IN;
|
||||
@ -3249,8 +3251,6 @@ bool OSDMonitor::prepare_boot(MonOpRequestRef op)
|
||||
}
|
||||
}
|
||||
|
||||
pending_inc.new_xinfo[from] = xi;
|
||||
|
||||
// wait
|
||||
wait_for_finished_proposal(op, new C_Booted(this, op));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user