The pool_stats map comes from a get('df') that may not include a pool
because it was just deleted.
Fixes: https://tracker.ceph.com/issues/41386
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
9d45bd9cc96b4f15c13b94113219c76d7af732cc)
# iterate over all pools to determine how they should be sized
for pool_name, p in iteritems(pools):
pool_id = p['pool']
+ if pool_id not in pool_stats:
+ # race with pool deletion; skip
+ continue
# FIXME: we assume there is only one take per pool, but that
# may not be true.