]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: prevent new sessions during shutdown 44544/head
authorSage Weil <sage@newdream.net>
Thu, 16 Dec 2021 15:24:46 +0000 (10:24 -0500)
committerCory Snyder <csnyder@iland.com>
Tue, 11 Jan 2022 20:29:39 +0000 (15:29 -0500)
commit796abd1f8fd255527c6cb4bbda82660b0fe38c25
tree55c04630cf7c5d1043cb5bbecd8689baf6616338
parentb78870188b9f298f2d65594d7afb6e2019bff155
mon: prevent new sessions during shutdown

From shutdown() we set STATE_SHUTDOWN and then call remove_all_sessions().
ms_handle_accept() is the only caller of add_session, so verifying that
we aren't shutting down (while under the session_map_lock) is sufficient
to prevent any new sessions from being added.

Fixes: https://tracker.ceph.com/issues/39150
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit c98b268847a1b79dbd1693f1c5ba120f6fc05855)
src/mon/Monitor.cc