]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: peek_map_epoch: skip legacy PGs if infos object is missing 5892/head
authorSage Weil <sage@redhat.com>
Fri, 11 Sep 2015 15:00:38 +0000 (11:00 -0400)
committerSage Weil <sage@redhat.com>
Sat, 12 Sep 2015 13:21:00 +0000 (09:21 -0400)
- pg is removed
- osd is stopped before pg is fully removed
- on restart, we ignore/skip the pg because its epoch is too old
- we upgrade to hammer and convert other pgs, skipping this one, and then
  remove the legacy infos object
- hammer starts, tries to parse the legacy pg, and fails because the infos
  object is gone, crashing.

The fix is to continue ignoring the zombie pg.

Fixes: #16030
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 3abfc5a4125984839d79a23a88b081dcd35f4759..7b91bf8c97d934d60004f30174b034c462ddd03d 100644 (file)
@@ -2866,7 +2866,12 @@ int PG::peek_map_epoch(ObjectStore *store,
     values.clear();
     keys.insert(ek);
     store->omap_get_values(META_COLL, legacy_infos_oid, keys, &values);
-    assert(values.size() == 1);
+    if (values.size() < 1) {
+      // see #13060: this suggests we failed to upgrade this pg
+      // because it was a zombie and then removed the legacy infos
+      // object.  skip it.
+      return -1;
+    }
     bufferlist::iterator p = values[ek].begin();
     ::decode(cur_epoch, p);
   } else {