From f1fa4e891f62e0796d09a1c9d8919785c9f420c6 Mon Sep 17 00:00:00 2001 From: jrshiqi Date: Thu, 16 Jan 2020 17:02:38 +0800 Subject: [PATCH] client: fix blacklist removal failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit when network is up until over mon_osd_blacklist_default_expire, the ceph-fuse will receive two epoch OSDMap,one include blacklist, the other one is blacklist recovery,but blacklist_events include recovered blacklist, then the client is added to the blacklist in error. the solution is that used the objecter->with_osdmap to determine whether there is a blacklist, the objecter->with_osdmap has the correct blacklist. Fixes:https://tracker.ceph.com/issues/37617 Signed-off-by: gengjichao --- src/client/Client.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 5cbd55bffb03f..171b66e11c398 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2500,7 +2500,9 @@ void Client::handle_osd_map(const MConstRef& m) // some PGs were inaccessible. objecter->op_cancel_writes(-EBLACKLISTED); - } else if (blacklisted) { + } + + if (blacklisted) { // Handle case where we were blacklisted but no longer are blacklisted = objecter->with_osdmap([myaddrs](const OSDMap &o){ return o.is_blacklisted(myaddrs);}); -- 2.39.5