From 71d1dcbb98bf1b3c7953c13a1165ba1cac7e7fd0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 28 Aug 2017 23:53:18 -0400 Subject: [PATCH] mon: do not join quorum unless luminous upgrade has completed Signed-off-by: Sage Weil --- src/mon/Monitor.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index a65d1fbe9dd..93fa0fad586 100755 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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; -- 2.39.5