]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: do not reference pgservice if quorum not formed
authorKefu Chai <kchai@redhat.com>
Wed, 17 May 2017 10:18:05 +0000 (18:18 +0800)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 17:02:42 +0000 (13:02 -0400)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/OSDMonitor.cc

index 563bc2d1a3f5a3c67c3ffb379bcb37383941cec6..015fbd487179467960b8d24c72ff929854f0f4b4 100644 (file)
@@ -1458,8 +1458,12 @@ void OSDMonitor::share_map_with_random_osd()
 
 version_t OSDMonitor::get_trim_to()
 {
-  epoch_t floor;
+  if (mon->get_quorum().empty()) {
+    dout(10) << __func__ << ": quorum not formed" << dendl;
+    return 0;
+  }
 
+  epoch_t floor;
   if (mon->monmap->get_required_features().contains_all(
         ceph::features::mon::FEATURE_LUMINOUS)) {
     {