]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: check mds down status bofore getting mds_gid_t from mdsmap
authoryite.gu <yitegu0@gmail.com>
Mon, 29 Jan 2024 10:26:20 +0000 (18:26 +0800)
committeryitegu <yitegu0@gmail.com>
Wed, 10 Jul 2024 03:32:55 +0000 (11:32 +0800)
commit87263832d89b49f1665a21f7ae770a1de3a7066c
tree0655f7dc903cf896089e563547ad016fff262dd5
parentf1b34d1d80d52d4ee7358047f60e1babbe2d6044
client: check mds down status bofore getting mds_gid_t from mdsmap

Get mds_gid_t from up of MDSMap, will cause to core dump if target
mds_rank_t does not exist up map:

from: src/mds/MDSMap.h
  const auto& get_info(mds_rank_t m) const {
    return mds_info.at(up.at(m));
  }

reproduct:
1. ceph fs fail <fs_name>
2. curl -X GET "example.com:8080/api/cephfs/1/clients" ...
up.at(m) will cause to core dump.

Fixes: https://tracker.ceph.com/issues/61844
Signed-off-by: Yite Gu <yitegu0@gmail.com>
(cherry picked from commit 878463ef3a26f49b9ccad9696ad130fb5aee47e7)
qa/tasks/mgr/dashboard/test_cephfs.py
src/client/Client.cc
src/pybind/mgr/dashboard/controllers/cephfs.py