Skip to content

Start containers, even when connected to a disabled bridge port#49705

Merged
vvoland merged 1 commit intomoby:masterfrom
robmry:continue_if_bridge_port_down
Mar 26, 2025
Merged

Start containers, even when connected to a disabled bridge port#49705
vvoland merged 1 commit intomoby:masterfrom
robmry:continue_if_bridge_port_down

Conversation

@robmry
Copy link
Contributor

@robmry robmry commented Mar 26, 2025

- What I did

#49364 introduced a check that, if a container's veth is connected to a bridge, the port is forwarding before sending unsolicited ARP/NA messages to advertise the container's MAC/IP addresses.

It waited for up-to 200ms, but it seems that's not always enough.

If the port isn't forwarding, the ARP/NA messages will be silently dropped. But, if it comes up within two seconds, one or both of the resends will succeed.

(All reports of the issue seem to be from Compose users, but I don't think that's relevant.)

- How I did it

Keep the wait for 200ms but, if anything goes wrong with checking the bridge port's state, or it's not forwarding after that time, just log an info/warning level message and continue.

- How to verify it

Existing tests - but no repro for the slow transition to "forwarding".

- Human readable description for the release notes

Fix an issue that caused container network attachment to fail with error "Bridge port not forwarding".

Commit 9a6e96f ("Before sending ARPs/NAs, check the bridge is ready")
introduced a check that, if a container's veth is connected to a bridge,
the port is forwarding before sending unsolicited ARP/NA messages to
advertise the container's MAC/IP addresses.

It waited for up-to 200ms, but it seems that's not always enough.

If the port isn't forwarding, the ARP/NA messages will be silently
dropped. But, if it comes up within two seconds, one or both of the
resends will succeed.

So - keep the wait for 200ms but, if anything goes wrong with checking
the bridge port's state, or it's not forwarding after that time, just
log an info/warning level message and continue.

Signed-off-by: Rob Murray <rob.murray@docker.com>
@robmry robmry added this to the 28.0.5 milestone Mar 26, 2025
@robmry robmry self-assigned this Mar 26, 2025
@robmry robmry requested review from akerouanton and vvoland March 26, 2025 12:19
@vvoland vvoland merged commit 264fc2f into moby:master Mar 26, 2025
167 checks passed
@robmry robmry deleted the continue_if_bridge_port_down branch April 2, 2025 10:16
@thompson-shaun thompson-shaun modified the milestones: 28.0.5, 28.1.0 Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Bridge port not forwarding" error in docker-compose setup

4 participants