From: Sage Weil Date: Sat, 7 Apr 2018 19:18:52 +0000 (-0500) Subject: mon/OSDMonitor: disallow pg_num changes while CREATING flag is set X-Git-Tag: v14.0.1~371^2~44 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7fc3a9bd07c5278782437f1bc068da103ae1b617;p=ceph-ci.git mon/OSDMonitor: disallow pg_num changes while CREATING flag is set Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index ea84caeab79..4fefba9e90d 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -6844,6 +6844,10 @@ int OSDMonitor::prepare_command_pool_set(const cmdmap_t& cmdmap, << " (you may adjust 'mon max pool pg num' for higher values)"; return -ERANGE; } + if (p.has_flag(pg_pool_t::FLAG_CREATING)) { + ss << "cannot adjust pg_num while initial PGs are being created"; + return -EBUSY; + } if (n > (int)p.get_pg_num()) { p.set_pg_num(n); } else {