]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr: relax osd ok-to-stop condition on degraded pgs 39887/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Sun, 7 Feb 2021 04:40:36 +0000 (12:40 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 11 Mar 2021 07:06:01 +0000 (15:06 +0800)
commitcf2c1b4ad4f6303b7728858c4dd3198dedbde102
treee092848cc661956881567d13c54bb7ebddcd4560
parent60dbe1f5c05404e38652ffcbd63767d6d515295c
mgr: relax osd ok-to-stop condition on degraded pgs

Right now, the "ok-to-stop" condition is relatively rigorous, it allows
stopping an osd only if no PG on it is non-active or degraded. But there
are situations in which an OSD is part of a degraded pg and the pg still
still have > min_size complete replicas after the OSD is stopped.

In 9750061d5d4236aaba156d60790e0b8bcd7cfb64, we changed from considering
just acting to using avail_no_missing (OSDs that have no missing objects).
When the projected pg_acting is constructed this way, we can safely compare
to min_size... even for a PG marked degraded.

Fixes: https://tracker.ceph.com/issues/49392
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit 2f28fc58eb63e20c2a869f5407516cf8044dbc41)
src/mgr/DaemonServer.cc