Exclude myself when building a list of peers that may need deleted

We already avoid actually doing the delete, but adding this check
stops the program logging that it was thinking about it.
This commit is contained in:
Bryan Boreham committed 2019-10-10 13:22:20 +00:00
1 parent cb8e06c994
commit d1ed6c5747
1 file changed
+3 -1
+3 -1
View File
@@ -112,7 +112,9 @@ func reclaimRemovedPeers(kube kubernetes.Interface, cml *configMapAnnotations, m
}
peerMap := make(map[string]peerInfo, len(storedPeerList.Peers))
for _, peer := range storedPeerList.Peers {
peerMap[peer.PeerName] = peer
if peer.PeerName != myPeerName {
peerMap[peer.PeerName] = peer
}
}
// remove entries from the peer map that are current nodes
for key, peer := range peerMap {