This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 672
Break out of kube rm-peers loop if nothing changes #3317
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Avoid getting into an infinite loop if some of the logic or underlying data is bad
bboreham
force-pushed
the
break-infinite-loop
branch
from
June 12, 2018 08:32
6a7159c
to
9c30fa5
Compare
Moved to 2.3 branch since it's a bug users have seen for real. |
brb
reviewed
Jun 12, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one nick.
prog/kube-peers/main.go
Outdated
@@ -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 |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
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.
bboreham
force-pushed
the
break-infinite-loop
branch
from
June 12, 2018 11:55
9c30fa5
to
cf66c8d
Compare
hswong3i
added a commit
to alvistack/kubernetes-sigs-kubespray
that referenced
this pull request
Aug 7, 2018
Upstream Changes: - weave 2.4.0 (https://github.com/weaveworks/weave/releases/tag/v2.4.0) - Support `externalTrafficPolicy: Local` (weaveworks/weave#2924) - Make the ipset list size bigger (weaveworks/weave#3305) - Break out of kube rm-peers loop if nothing changes (weaveworks/weave#3317) Our Changes: - Revamp weave-net.yml.j2 with upstream changes - Add more variables for customization - Replace WEAVE_PASSWORD with k8s secret - Remove hard-corded seed mode support, in favor of variables customization
rguichard
pushed a commit
to rguichard/kubespray
that referenced
this pull request
Oct 5, 2018
Upstream Changes: - weave 2.4.0 (https://github.com/weaveworks/weave/releases/tag/v2.4.0) - Support `externalTrafficPolicy: Local` (weaveworks/weave#2924) - Make the ipset list size bigger (weaveworks/weave#3305) - Break out of kube rm-peers loop if nothing changes (weaveworks/weave#3317) Our Changes: - Revamp weave-net.yml.j2 with upstream changes - Add more variables for customization - Replace WEAVE_PASSWORD with k8s secret - Remove hard-corded seed mode support, in favor of variables customization
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Avoid getting into an infinite loop if some of the logic or underlying data is bad
#3310 has an example of one infinite loop:
Edit: I added another commit to avoid the only way I can see to get into that situation.