]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: allow upmap records for deleted pools to be removed
authorSage Weil <sage@redhat.com>
Thu, 25 May 2017 20:52:40 +0000 (16:52 -0400)
committerSage Weil <sage@redhat.com>
Fri, 26 May 2017 18:00:57 +0000 (14:00 -0400)
Otherwise the offline osdmaptool --upmap-cleanup can't do its thing.

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

index e28621cffafda6770fdd6600f5232e85c7307fa7..edb50a6d34a220b10dc346b96cf85d6bf304a82f 100644 (file)
@@ -7861,11 +7861,6 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
       err = -EINVAL;
       goto reply;
     }
-    if (!osdmap.pg_exists(pgid)) {
-      ss << "pg " << pgid << " does not exist";
-      err = -ENOENT;
-      goto reply;
-    }
     if (pending_inc.new_pg_upmap.count(pgid) ||
        pending_inc.old_pg_upmap.count(pgid)) {
       dout(10) << __func__ << " waiting for pending update on " << pgid << dendl;
@@ -7981,11 +7976,6 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
       err = -EINVAL;
       goto reply;
     }
-    if (!osdmap.pg_exists(pgid)) {
-      ss << "pg " << pgid << " does not exist";
-      err = -ENOENT;
-      goto reply;
-    }
     if (pending_inc.new_pg_upmap_items.count(pgid) ||
        pending_inc.old_pg_upmap_items.count(pgid)) {
       dout(10) << __func__ << " waiting for pending update on " << pgid << dendl;