From: Patrick Donnelly Date: Tue, 22 Aug 2017 19:11:25 +0000 (-0700) Subject: mon: get writeable osdmap for added data pool X-Git-Tag: v13.0.0~23^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=94a62a3dff847e515510550f5e8af4a61671d667;p=ceph.git mon: get writeable osdmap for added data pool Continuation of: 435717791ec499f71c9d1485b1e4e63239a343e2 Fixes: http://tracker.ceph.com/issues/21064 Signed-off-by: Patrick Donnelly --- diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index a8334d1164c5b..98f272d4b0fd8 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -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,