mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
mon: get writeable osdmap for added data pool
Continuation of: 435717791e
Fixes: http://tracker.ceph.com/issues/21064
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
parent
60eb0e58d9
commit
94a62a3dff
@ -521,8 +521,17 @@ class AddDataPoolHandler : public FileSystemCommandHandler
|
||||
return 0;
|
||||
}
|
||||
|
||||
mon->osdmon()->do_application_enable(poolid,
|
||||
pg_pool_t::APPLICATION_NAME_CEPHFS);
|
||||
// if we're running as luminous, we have to set the pool application metadata
|
||||
if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS ||
|
||||
mon->osdmon()->pending_inc.new_require_osd_release >= CEPH_RELEASE_LUMINOUS) {
|
||||
if (!mon->osdmon()->is_writeable()) {
|
||||
// not allowed to write yet, so retry when we can
|
||||
mon->osdmon()->wait_for_writeable(op, new PaxosService::C_RetryMessage(mon->mdsmon(), op));
|
||||
return -EAGAIN;
|
||||
}
|
||||
mon->osdmon()->do_application_enable(poolid, pg_pool_t::APPLICATION_NAME_CEPHFS);
|
||||
mon->osdmon()->propose_pending();
|
||||
}
|
||||
|
||||
fsmap.modify_filesystem(
|
||||
fs->fscid,
|
||||
|
Loading…
Reference in New Issue
Block a user