]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
client: check if a mds rank is `up` before fetching connection addr
authorVenky Shankar <vshankar@redhat.com>
Wed, 16 Jun 2021 04:53:16 +0000 (00:53 -0400)
committerVenky Shankar <vshankar@redhat.com>
Wed, 16 Jun 2021 05:02:37 +0000 (01:02 -0400)
commit951483fd36c28c65f12da7c058132d14a99ac5a9
tree709276c6ad2e840de4c80e6ab4170e6d6a62108c
parent6f58a2628141e70a5572854ff7989b2ae70c9964
client: check if a mds rank is `up` before fetching connection addr

Client segfaults when trying to infer which mds rank a connection
reset call is coming from. It does this by iterating `mds_sessions`
and checking the mds addr (in mdsmap) to the `Connection *`.

However, cases where the mds is blocklisted, the client receives
an updated mdsmap in which the corresponding mds is not in `up`
set thereby resulting in a segfault when calling `mdsmap->get_addrs`
since it expects that the mds should be in `up` state.

Note that this leaves the `Connection *` as it is and does not clean
it up. That needs to fixed separately probably by maintaining a map
of `Connection *` to mds rank for lookup.

Fixes: http://tracker.ceph.com/issues/50530
Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/client/Client.cc