]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient: use FEATUREMASK for testing for SERVER_KRAKEN on the server
authorSage Weil <sage@redhat.com>
Fri, 3 Feb 2017 12:56:08 +0000 (07:56 -0500)
committerSage Weil <sage@redhat.com>
Mon, 6 Feb 2017 20:43:50 +0000 (15:43 -0500)
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 <sage@redhat.com>
src/mon/MonClient.cc

index b6634603f91fad483b1dabc7100000857337e4e4..20abe28cd36df3c5d56f2c873fac596ae1246027 100644 (file)
@@ -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;