]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: config mgrclient for pre-luminous cluster
authorJohn Spray <john.spray@redhat.com>
Mon, 30 Apr 2018 15:31:27 +0000 (11:31 -0400)
committerKefu Chai <kchai@redhat.com>
Fri, 4 May 2018 08:39:21 +0000 (16:39 +0800)
Signed-off-by: John Spray <john.spray@redhat.com>
src/librados/RadosClient.cc

index 6821e58dced624f680849bb19dc143bcb34e0722..cdca87909bb0086fd342716b28fbc95686c60210 100644 (file)
@@ -311,6 +311,11 @@ int librados::RadosClient::connect()
   }
   messenger->set_myname(entity_name_t::CLIENT(monclient.get_global_id()));
 
+  // Detect older cluster, put mgrclient into compatible mode
+  mgrclient.set_mgr_optional(
+      !get_required_monitor_features().contains_all(
+        ceph::features::mon::FEATURE_LUMINOUS));
+
   // MgrClient needs this (it doesn't have MonClient reference itself)
   monclient.sub_want("mgrmap", 0, 0);
   monclient.renew_subs();