Don't try to remove a cleared docker_gwbridge endpoint#51534
Merged
Conversation
If a container is using a docker_gwbridge endpoint as its gateway, when it's connected to another network that provides a gateway, the docker_gwbridge endpoint is removed when that endpoint is added (in a recursive nightmare). So, the "before" gateway for the container has been removed before the new gateway is updateExternalConnectivity'd. Don't pass the old gateway to updateExternalConnectivity in that case, because the network driver's already forgotten about it. Signed-off-by: Rob Murray <rob.murray@docker.com>
Member
|
This related, or a random flakiness? |
Contributor
Author
Ah, thank you - was just looking at that ... I'm pretty sure it's unrelated. |
akerouanton
approved these changes
Nov 14, 2025
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.
- What I did
If a container is using a
docker_gwbridgeendpoint as its gateway, when it's connected to another network that provides a gateway, thedocker_gwbridgeendpoint is removed (in a recursive nightmare).So, the "before" gateway for the container has been removed before the new gateway is updateExternalConnectivity'd, and an error is raised because it can't be removed again.
This will affect any container using
docker_gwbridge- most won't ... the built-in ipvlan/macvlan drivers disable it, and non-internal bridge networks require IPv4 or IPv6. But I'm not sure if there's a way to provoke the error with Swarm.- How I did it
Don't pass the old gateway to updateExternalConnectivity in that case, because the network driver's already forgotten about it.
- How to verify it
This needs a regression test - but wanted to get the fix in first (missed 29.0.1, but there will be a 29.0.2).
For now, manual repro ...
DisableGatewayEndpointin itsJoinresponse).- Human readable description for the release notes