From: Sage Weil Date: Wed, 24 Feb 2021 22:05:55 +0000 (-0500) Subject: mon/OSDMonitor: behave if inc map sets weight on not-yet-existing OSD X-Git-Tag: v17.1.0~2806^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=678dc40cb2772340f6e3764825f5a3ee17cac9ec;p=ceph.git mon/OSDMonitor: behave if inc map sets weight on not-yet-existing OSD Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b429376876a3e..25dfa31482976 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1422,7 +1422,7 @@ void OSDMonitor::maybe_prime_pg_temp() for (auto p = pending_inc.new_weight.begin(); !all && p != pending_inc.new_weight.end(); ++p) { - if (p->second < osdmap.get_weight(p->first)) { + if (osdmap.exists(p->first) && p->second < osdmap.get_weight(p->first)) { // weight reduction osds.insert(p->first); } else {