Do not allow overlay destroySandbox() to be interrupted#1065
Merged
mavenugo merged 1 commit intomoby:masterfrom Mar 31, 2016
aboch:ov
Merged
Do not allow overlay destroySandbox() to be interrupted#1065mavenugo merged 1 commit intomoby:masterfrom aboch:ov
mavenugo merged 1 commit intomoby:masterfrom
aboch:ov
Conversation
- Concurrent leave/join of one member overlay network can end with the error: "subnet sandbox join failed for "A.B.C.D/MM": error creating vxlan interface: file exists" This happens when the join is processed while the leave has already started. Having the network one member only, the leave resets the once variable for this network subnets and triggers the sandbox destroy for each subnet's vxlan interface, when the n.joinCnt goes to 0. But given the destroySandbox() is not atomic, the join thread can trigger the creation of the vxlan interface in between (given subnet.once was re-initialized) before the leave thread removes the vxlan interface for this subnet. - The fix is to not allow interruptions between the re-initialization of the subnet.once var and consequent vxlan interface removal. Signed-off-by: Alessandro Boch <aboch@docker.com>
Contributor
|
LGTM pending CI green |
Contributor
|
LGTM |
sanimej
pushed a commit
to sanimej/libnetwork
that referenced
this pull request
Apr 4, 2016
Do not allow overlay destroySandbox() to be interrupted Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
"subnet sandbox join failed for "A.B.C.D/MM": error creating vxlan interface: file exists"
This happens when the join is processed while the leave has already started.
Having the network one member only, the leave resets the once variable for this network subnets
and triggers the sandbox destroy for each subnet's vxlan interface, when the n.joinCnt goes to 0.
But given the destroySandbox() is not atomic, the join thread can trigger the creation of the
vxlan interface in between (given subnet.once was re-initialized) before the leave thread
removes the vxlan interface for this subnet.
consequent vxlan interface removal.
Steps to reproduce (one node is enough):
Signed-off-by: Alessandro Boch aboch@docker.com