From: Sage Weil Date: Fri, 3 Feb 2017 12:56:08 +0000 (-0500) Subject: mon/MonClient: use FEATUREMASK for testing for SERVER_KRAKEN on the server X-Git-Tag: v12.0.1~467^2~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6d91f707be75fd62a806d2cfcc70c37d87b268f9;p=ceph.git mon/MonClient: use FEATUREMASK for testing for SERVER_KRAKEN on the server The mon we are talking to may be an old ceph-mon with the prior meanging of the SERVER_KRAKEN bit; use the mask to disambiguate instead of testing for two featurse explicitly. Signed-off-by: Sage Weil --- diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index b6634603f91..20abe28cd36 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -487,11 +487,10 @@ void MonClient::handle_auth(MAuthReply *m) } // do not request MGR key unless the mon has the SERVER_KRAKEN // feature. otherwise it will give us an auth error. note that - // we have to check for both the kraken and jewel key because - // pre-jewel the kraken feature bit was used for something else. + // we have to use the FEATUREMASK because pre-jewel the kraken + // feature bit was used for something else. if ((want_keys & CEPH_ENTITY_TYPE_MGR) && - !(m->get_connection()->has_feature(CEPH_FEATURE_SERVER_KRAKEN) && - m->get_connection()->has_feature(CEPH_FEATURE_SERVER_JEWEL))) { + !(m->get_connection()->has_features(CEPH_FEATUREMASK_SERVER_KRAKEN))) { ldout(cct, 1) << __func__ << " not requesting MGR keys from pre-kraken monitor" << dendl;