From 733fb72acfeb79adbb26166ca13b1e5927cd6547 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Fri, 24 Jun 2022 12:47:57 +0530 Subject: [PATCH] mds: Don't blocklist clients in any replay state The mds in 'standby-replay' state should not blocklist clients. Attempting to do so would hit an assert while journaling. Before the commit 79f7576 the 'Server:apply_blocklist' used to fetch the blocklist addresses from 'Objecter::consume_blocklist_events' which returns blocklist addresses only if 'blocklist_events_enabled' are enabled. This is not enabled for mds in 'standby-replay' state. Hence this issue wasn't seen. After the commit 79f7576 the 'Server::apply_blocklist' fetches the blocklist addresses from the osdmap. This would return the blocklist addresses irrespective of the mds state. The mds in 'replay' state doesn't blocklist the clients but if the mds is in 'standby-replay' state, it tries to journal the blocklist and asserts. This patch fixes the same by not allowing the blocklist if the mds is in any replay state. Introduced-by: 79f7576401cc9d857f84396314d7476336c0e271 Fixes: https://tracker.ceph.com/issues/56012 Signed-off-by: Kotresh HR --- src/mds/MDSRank.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index 10fd2feeaa8df..9f28a6fa27d15 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -3513,7 +3513,7 @@ void MDSRankDispatcher::handle_osd_map() // reconnect state will journal blocklisted clients (journal // is opened for writing in `replay_done` before moving to // up:resolve). - if (!is_replay()) { + if (!is_any_replay()) { std::set newly_blocklisted; objecter->consume_blocklist_events(&newly_blocklisted); auto epoch = objecter->with_osdmap([](const OSDMap &o){return o.get_epoch();}); -- 2.47.3