]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix blacklist removal failed 33169/head
authorjrshiqi <root@YZ-25-60-7.h.chinabank.com.cn>
Thu, 16 Jan 2020 09:02:38 +0000 (17:02 +0800)
committergengjichao <chaofuwa2008@126.com>
Mon, 10 Feb 2020 07:27:36 +0000 (15:27 +0800)
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 <chaofuwa2008@126.com>
src/client/Client.cc

index 5cbd55bffb03f19b8f8c2f4d616aedb47e77401a..171b66e11c39860b1f13d22b5513851a9381cb99 100644 (file)
@@ -2500,7 +2500,9 @@ void Client::handle_osd_map(const MConstRef<MOSDMap>& 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);});