]> 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 58587/head
authoryite.gu <yitegu0@gmail.com>
Mon, 29 Jan 2024 10:26:20 +0000 (18:26 +0800)
committeryitegu <yitegu0@gmail.com>
Mon, 15 Jul 2024 08:30:39 +0000 (16:30 +0800)
commit24fe39a3b7ab9e9d3515b645b5c26aced929dd71
treefca834f0ec01ac8ca56e71ae45a82965d57d0a88
parent93c7a1c4e0e4943eece016a31cce9978d60fad95
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