]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/PGMap: do not consider changing pg stuck
authorKefu Chai <kchai@redhat.com>
Wed, 1 Jul 2020 11:33:35 +0000 (19:33 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 1 Jul 2020 11:39:35 +0000 (19:39 +0800)
commit34e1df66cdf9ac4aeea338a8f3d5b9a10fa5983a
tree6516fb8a2bc61736c59737892faa023349d6e243
parent7948e2de78a4a533cddc1dc505d1def5d42e8aa6
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>
src/mon/PGMap.cc