]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: check mds down status bofore getting mds_gid_t from mdsmap 52258/head
authoryite.gu <yitegu0@gmail.com>
Mon, 29 Jan 2024 10:26:20 +0000 (18:26 +0800)
committeryite.gu <yitegu0@gmail.com>
Mon, 26 Feb 2024 11:54:10 +0000 (19:54 +0800)
commit878463ef3a26f49b9ccad9696ad130fb5aee47e7
tree83c0db45e0dd6f88e41bb3751888baabeac7aa63
parente99486edc59b2df9e7c31504d0b4d45539a49f0b
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>
qa/tasks/mgr/dashboard/test_cephfs.py
src/client/Client.cc
src/pybind/mgr/dashboard/controllers/cephfs.py