From: jrshiqi Date: Thu, 16 Jan 2020 09:02:38 +0000 (+0800) Subject: client: fix blacklist removal failed X-Git-Tag: v16.1.0~2574^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f1fa4e891f62e0796d09a1c9d8919785c9f420c6;p=ceph.git client: fix blacklist removal failed 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 --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 5cbd55bffb03..171b66e11c39 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);});