From: Sage Weil Date: Fri, 2 Feb 2018 17:59:29 +0000 (-0600) Subject: mon/OSDMonitor: reject force-create-pg on pgids that shouldn't exist X-Git-Tag: v13.0.2~339^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5aadca16f0f1c0281ba08f233bccb512f0187b17;p=ceph.git mon/OSDMonitor: reject force-create-pg on pgids that shouldn't exist Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 0a6cbad9df9b..e6b9279003ba 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -10927,6 +10927,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -EINVAL; goto reply; } + if (!osdmap.pg_exists(pgid)) { + ss << "pg " << pgid << " should not exist"; + err = -ENOENT; + goto reply; + } bool creating_now; { std::lock_guard l(creating_pgs_lock);