mdsmon: don't add pool application metadata until running fully-luminous

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
This commit is contained in:
Greg Farnum 2017-08-09 13:46:30 -07:00
parent 0956b3aafd
commit bcd3554bc5
2 changed files with 10 additions and 4 deletions

View File

@ -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,

View File

@ -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);