Don't remove myself when reclaiming
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.
This commit is contained in:
1 parent
ad6148f0f6
commit
cf66c8d507
1 file changed
+4
@@ -119,6 +119,10 @@ 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
|
// 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 {
|
for _, peer := range peerMap {
|
||||||
|
if peer.PeerName == myPeerName { // Don't remove myself.
|
||||||
|
common.Log.Warnln("[kube-peers] not removing myself", peer)
|
||||||
|
continue
|
||||||
|
}
|
||||||
common.Log.Debugln("[kube-peers] Preparing to remove disappeared peer", peer)
|
common.Log.Debugln("[kube-peers] Preparing to remove disappeared peer", peer)
|
||||||
okToRemove := false
|
okToRemove := false
|
||||||
// 3. Check if there is an existing annotation with key X
|
// 3. Check if there is an existing annotation with key X
|
||||||
|
|||||||
Reference in new issue
Block a user