- 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>
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 {