]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: get writeable osdmap for added data pool 17163/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 22 Aug 2017 19:11:25 +0000 (12:11 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 23 Aug 2017 04:26:00 +0000 (21:26 -0700)
Continuation of: 435717791ec499f71c9d1485b1e4e63239a343e2

Fixes: http://tracker.ceph.com/issues/21064
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/FSCommands.cc

index a8334d1164c5b048854ee68f05e503495b4438fc..98f272d4b0fd86cef95285a21d5dee3a43da7b7a 100644 (file)
@@ -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,