]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds/FSMap: go back to STARTING state when rank doesn't make it pass STARTING
authorethanwu <ethanwu@synology.com>
Sun, 24 Mar 2024 08:17:49 +0000 (16:17 +0800)
committerJos Collin <jcollin@redhat.com>
Thu, 4 Jul 2024 12:18:07 +0000 (17:48 +0530)
commit4e2b7d1f81a49305450d0dfa4cff66cd361b3679
tree9443930bc55c3f20e5add4fcf99a16ed10182392
parent8952f765fb53a25ab007365ad1c7026ae3e37d25
mds/FSMap: go back to STARTING state when rank doesn't make it pass STARTING

Just like STATE_CREATING, mds could fail or being stopped any where at
STATE_STARTING state, so make sure subsequent take-over mds will start
from STATE_STARTING. Otherwise, we'll end up with empty journal(No ESubtreeMap).
The subsequent take-over mds will fail with no subtrees found and rank will be
marked damaged.

Quick way to reproduce this:
  ./bin/ceph fs set a down true  # take down all rank in filesystem a
  #wait for fs to stop all rank
  ./bin/ceph fs set a down true; pidof ceph-mds | xargs kill
  # quickly kill all mds soon after they enter starting state
  ./bin/ceph-mds -i a -c ./ceph.conf
  # start all mds. Then we'll find out that mds rank is reported damaged with following log

-1 log_channel(cluster) log [ERR] : No subtrees found for root MDS rank!
 5 mds.beacon.a set_want_state: up:rejoin -> down:damaged

Fixes: https://tracker.ceph.com/issues/65094
Signed-off-by: ethanwu <ethanwu@synology.com>
(cherry picked from commit 767494d68c8c3130097f3cf794aadccc5bd98806)
src/mds/FSMap.cc