From: Sage Weil Date: Wed, 4 Apr 2018 21:20:06 +0000 (-0500) Subject: TEST Revert "mon/OSDMonitor: disallow pg_num changes until after pool is created" X-Git-Tag: v13.1.0~390^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7db0fd0a8d69d29edbb8524256a85f78a636b5c1;p=ceph.git TEST Revert "mon/OSDMonitor: disallow pg_num changes until after pool is created" 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 --- diff --git a/src/mon/CreatingPGs.h b/src/mon/CreatingPGs.h index a80585032bec..fae7e6f2ce5a 100644 --- a/src/mon/CreatingPGs.h +++ b/src/mon/CreatingPGs.h @@ -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 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) { diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 5bfb445b3873..4eb692e10f86 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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;