From e2db4aea87be15e7c54987bb8bf0f02c08a527f4 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 18 Dec 2013 17:53:51 -0800 Subject: [PATCH] OSDMonitor: remove primary_temp entries when you remove their pool Signed-off-by: Greg Farnum --- src/mon/OSDMonitor.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 31e977c58c4b..77d33a04bbee 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; } -- 2.47.3