From: Greg Farnum Date: Thu, 19 Dec 2013 01:53:51 +0000 (-0800) Subject: OSDMonitor: remove primary_temp entries when you remove their pool X-Git-Tag: v0.78~329^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e2db4aea87be15e7c54987bb8bf0f02c08a527f4;p=ceph.git OSDMonitor: remove primary_temp entries when you remove their pool Signed-off-by: Greg Farnum --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 31e977c58c4..77d33a04bbe 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4651,6 +4651,15 @@ int OSDMonitor::_prepare_remove_pool(uint64_t pool) pending_inc.new_pg_temp[p->first].clear(); } } + for (map::iterator p = osdmap.primary_temp->begin(); + p != osdmap.primary_temp->end(); + ++p) { + if (p->first.pool() == pool) { + dout(10) << "_prepare_remove_pool " << pool + << " removing obsolete primary_temp" << p->first << dendl; + pending_inc.new_primary_temp[p->first] = -1; + } + } return 0; }