We should clear addr_name before filling it. Otherwise, the removed
mon will stay there and cause incorrect rank assignment.

Signed-off-by: Henry C Chang <[email protected]>
---
 src/mon/MonMap.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mon/MonMap.h b/src/mon/MonMap.h
index 651a146..ffeb572 100644
--- a/src/mon/MonMap.h
+++ b/src/mon/MonMap.h
@@ -40,6 +40,7 @@ class MonMap {
   void calc_ranks() {
     rank_name.resize(mon_addr.size());
     rank_addr.resize(mon_addr.size());
+    addr_name.clear();
     for (map<string,entity_addr_t>::iterator p = mon_addr.begin();
         p != mon_addr.end();
         p++) {
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to