]> 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>
Sat, 5 May 2018 11:04:20 +0000 (19:04 +0800)
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 8fd500d736bc3c868736537d04940c627587ec63)

src/librados/RadosClient.cc

index 06436be1835dcafe609727f839c1c6910fabb830..a62da35f70ff324c2baab7b1638c6e41e0468a0b 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();