]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/PGMap: do not consider changing pg stuck 35959/head
authorKefu Chai <kchai@redhat.com>
Wed, 1 Jul 2020 11:33:35 +0000 (19:33 +0800)
committerLaura Paduano <lpaduano@suse.com>
Tue, 7 Jul 2020 11:42:48 +0000 (13:42 +0200)
commit5dbaeb2b636773995364c02e846aca14281899bf
treea947dd774615910fbff68b1c3abaab51d1ea8e9a
parent8b431c32343fa8b69f262fd41882278ad8f45a71
mon/PGMap: do not consider changing pg stuck

there is chance that we have a PG just created but fails to peered
before a mgr module retrieves the health report from mgr. in that
case, the "last_peered" field is not set, as that pg has not peered. but
normally, the newly created PG will be active+clean in couple seconds
which is way under the default setting of mon_pg_stuck_threshold (60
seconds).

so in this change, if the "last_whatever" is not set, we also use the
"last_changed" as a reference to see if the PG is healthy, and only
consider PG stuck if the last_changed is also too old.

Fixes: https://tracker.ceph.com/issues/45717
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 34e1df66cdf9ac4aeea338a8f3d5b9a10fa5983a)
src/mon/PGMap.cc