]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not join quorum unless luminous upgrade has completed
authorSage Weil <sage@redhat.com>
Tue, 29 Aug 2017 03:53:18 +0000 (23:53 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 14:18:06 +0000 (10:18 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Monitor.cc

index a65d1fbe9dd163365c083aea29172845b8d9ed9e..93fa0fad5864e7e34871c6ba1a27fb1ee47ae1d3 100755 (executable)
@@ -1768,6 +1768,22 @@ void Monitor::handle_probe_reply(MonOpRequestRef op)
     }
   }
 
+  // did the existing cluster complete upgrade to luminous?
+  if (osdmon()->osdmap.get_epoch()) {
+    if (osdmon()->osdmap.require_osd_release < CEPH_RELEASE_LUMINOUS) {
+      derr << __func__ << " existing cluster has not completed upgrade to"
+          << " luminous; 'ceph osd require_osd_release luminous' before"
+          << " upgrading" << dendl;
+      exit(0);
+    }
+    if (!osdmon()->osdmap.test_flag(CEPH_OSDMAP_PURGED_SNAPDIRS)) {
+      derr << __func__ << " existing cluster has not completed a full luminous"
+          << " scrub to purge legacy snapdir objects; please scrub before"
+          << " upgrading beyond luminous." << dendl;
+      exit(0);
+    }
+  }
+
   // is there an existing quorum?
   if (m->quorum.size()) {
     dout(10) << " existing quorum " << m->quorum << dendl;