Skip to content

Commit

Permalink
osd/PG: peek_map_epoch: skip legacy PGs if infos object is missing
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
liewegas committed Sep 12, 2015
1 parent f237ed9 commit 4be8a28
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/osd/PG.cc
Expand Up @@ -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 {
Expand Down

0 comments on commit 4be8a28

Please sign in to comment.