]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PeeringState.cc: skip peer_purged when discovering all missing 32847/head
authorNeha <nojha@redhat.com>
Wed, 11 Dec 2019 23:47:19 +0000 (23:47 +0000)
committerNathan Cutler <ncutler@suse.com>
Fri, 24 Jan 2020 16:39:07 +0000 (17:39 +0100)
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>
(cherry picked from commit 4960f579a234f9984d73767fde073c419e884c17)

Conflicts:
src/osd/PeeringState.cc
- file does not exist in nautilus; made the changes manually in
  src/osd/PG.cc

src/osd/PG.cc

index ecc8a3fd99bbd3730364dcec781b78e15ed6b819..6ef46f07a4c40246a074023f74b79de032e2eae3 100644 (file)
@@ -814,6 +814,11 @@ void PG::discover_all_missing(map<int, map<spg_t,pg_query_t> > &query_map)
       continue;
     }
 
+    if (peer_purged.count(peer)) {
+      dout(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())) {