From 7cb7bd625abfbf595592ab1ab1e90e01c7b31419 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 9 Aug 2017 13:46:30 -0700 Subject: [PATCH] mdsmon: don't add pool application metadata until running fully-luminous Signed-off-by: Greg Farnum (cherry picked from commit bcd3554bc5a3965077af655498fd434910f13040) --- src/mon/FSCommands.cc | 11 +++++++---- src/mon/OSDMonitor.cc | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 4b0445fb1347e..265a170f7dc49 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -194,10 +194,13 @@ class FsNewHandler : public FileSystemCommandHandler return r; } - mon->osdmon()->do_application_enable(data, - pg_pool_t::APPLICATION_NAME_CEPHFS); - mon->osdmon()->do_application_enable(metadata, - pg_pool_t::APPLICATION_NAME_CEPHFS); + if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS || + mon->osdmon()->pending_inc.new_require_osd_release >= CEPH_RELEASE_LUMINOUS) { + mon->osdmon()->do_application_enable(data, + pg_pool_t::APPLICATION_NAME_CEPHFS); + mon->osdmon()->do_application_enable(metadata, + pg_pool_t::APPLICATION_NAME_CEPHFS); + } // All checks passed, go ahead and create. fsmap.create_filesystem(fs_name, metadata, data, diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index d1c1766c2800c..780a76b303ed6 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3161,6 +3161,9 @@ void OSDMonitor::do_application_enable(int64_t pool_id, dout(20) << __func__ << ": pool_id=" << pool_id << ", app_name=" << app_name << dendl; + assert(osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS || + pending_inc.new_require_osd_release >= CEPH_RELEASE_LUMINOUS); + auto pp = osdmap.get_pg_pool(pool_id); assert(pp != nullptr); -- 2.39.5