If a pool has any PG with unfound objects, we should consider
it unavailable for the availability score. If a PG has unfound
objects, it will be recorded in PGMap.
In `get_unavailable_pg_in_map`, if a PG has unfound obejcts,
we add it to `pool_pg_unavailable_map`.
Fixes: https://tracker.ceph.com/issues/67777
Signed-off-by: Shraddha Agrawal <shraddha.agrawal000@gmail.com>
- non-active
- stale
+ Any PG that has unfound objects is also added to the map.
+
Eg: {1=[1.0],2=[],3=[]}
Here the cluster has 3 pools with id 1,2,3 and pool 1 has an inactive PG 1.0
*/
pool_pg_unavailable_map[poolid].push_back(i->first);
dout(20) << "pool: " << poolid << " pg: " << i->first
<< " is stuck unavailable" << " state: " << i->second.state << dendl;
+ } else if (i->second.stats.sum.num_objects_unfound) {
+ pool_pg_unavailable_map[poolid].push_back(i->first);
+ dout(20) << "pool: " << poolid << " pg: " << i->first
+ << " has " << i->second.stats.sum.num_objects_unfound << " unfound objects" << dendl;
}
}
}