]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon: prevent new sessions during shutdown
authorSage Weil <sage@newdream.net>
Thu, 16 Dec 2021 15:24:46 +0000 (10:24 -0500)
committerSage Weil <sage@newdream.net>
Thu, 16 Dec 2021 15:26:20 +0000 (10:26 -0500)
commitc98b268847a1b79dbd1693f1c5ba120f6fc05855
treeffc16909776e4f095dde687f5039c07f95571467
parent7b7686df855d0dfa1dee78eff8ed948f31b0ce0f
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>
src/mon/Monitor.cc