]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PeeringState.cc: skip peer_purged when discovering all missing
authorNeha <nojha@redhat.com>
Wed, 11 Dec 2019 23:47:19 +0000 (23:47 +0000)
committerNeha <nojha@redhat.com>
Wed, 11 Dec 2019 23:56:33 +0000 (23:56 +0000)
We hit a couple of bugs because in discover_all_missing() we send
pg_query to an OSD that was marked stray and already got purged. This results
in a state machine crash on the purged OSD. Fix this by skipping any
purged peers.

Fixes: https://tracker.ceph.com/issues/41317
Fixes: https://tracker.ceph.com/issues/40963
Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/PeeringState.cc

index 99534bcc62018a42d468e4c5106b6f88b60fcd4a..2d3450646cb407197f6352591ba71ca34784ee2d 100644 (file)
@@ -2225,6 +2225,11 @@ bool PeeringState::discover_all_missing(
       continue;
     }
 
+    if (peer_purged.count(peer)) {
+      psdout(20) << __func__ << " skipping purged osd." << peer << dendl;
+      continue;
+    }
+
     map<pg_shard_t, pg_info_t>::const_iterator iter = peer_info.find(peer);
     if (iter != peer_info.end() &&
         (iter->second.is_empty() || iter->second.dne())) {