]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
TEST Revert "mon/OSDMonitor: disallow pg_num changes until after pool is created"
authorSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 21:20:06 +0000 (16:20 -0500)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 21:20:36 +0000 (16:20 -0500)
This reverts commit 38319f8300ebf4a48b6910790467bad96d29941e.

I want to reproduce the race to see if there is a better way to avoid it.

This breaks tests that set pg_num, and generally makes interacting with
the cluster awkward for anything non-human.

# Conflicts:
# src/mon/CreatingPGs.h

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/CreatingPGs.h
src/mon/OSDMonitor.cc

index a80585032beca0a316b4ea6104b516740e9c23c1..fae7e6f2ce5ab5f3addea85059d4eb64f4986be1 100644 (file)
@@ -47,17 +47,6 @@ struct creating_pgs_t {
   /// pools that exist in the osdmap for which at least one pg has been created
   std::set<int64_t> created_pools;
 
-  bool is_creating_pool(int64_t poolid) {
-    if (queue.count(poolid)) {
-      return true;
-    }
-    for (auto& i : pgs) {
-      if (i.first.pool() == poolid) {
-       return true;
-      }
-    }
-    return false;
-  }
   bool create_pool(int64_t poolid, uint32_t pg_num,
                   epoch_t created, utime_t modified) {
     if (created_pools.count(poolid) == 0) {
index 5bfb445b3873d860e07f6a083ccfa7e489f7a43f..4eb692e10f862fdc55f2573ceffb21023dae460c 100644 (file)
@@ -6065,10 +6065,6 @@ int OSDMonitor::prepare_command_pool_set(const cmdmap_t& cmdmap,
          << " (you may adjust 'mon max pool pg num' for higher values)";
       return -ERANGE;
     }
-    if (creating_pgs.is_creating_pool(pool)) {
-      ss << "still creating initial PGs; cannot update pg_num yet";
-      return -EBUSY;
-    }
     int r = check_pg_num(pool, n, p.get_size(), &ss);
     if (r) {
       return r;