Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Don't remove myself when reclaiming
Browse files Browse the repository at this point in the history
Some logs from users show an entry of X with annotation X, which
suggests we have gone down the path of removing ourselves. This change
avoids that possibility.
  • Loading branch information
bboreham committed Jun 12, 2018
1 parent ad6148f commit 9c30fa5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prog/kube-peers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ func reclaimRemovedPeers(weave *weaveapi.Client, cml *configMapAnnotations, node
}
// 2. Loop for each X in the first set and not in the second - we wish to remove X from our data structures
for _, peer := range peerMap {
if peer.PeerName == myPeerName { // Don't remove myself.
continue
}
common.Log.Debugln("[kube-peers] Preparing to remove disappeared peer", peer)
okToRemove := false
// 3. Check if there is an existing annotation with key X
Expand Down

0 comments on commit 9c30fa5

Please sign in to comment.