Skip to content

[27.x backport] Recover from default bridge init failure #49307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

thaJeztah
Copy link
Member

git cherry-pick -s -S -x 22c02219de46b4565388491b18cbfcf61ce5ad3f
CONFLICT (directory rename split): Unclear where to rename integration/network/bridge to; it was renamed to multiple other directories, with no destination getting a majority of the files.
Auto-merging libnetwork/drivers/bridge/bridge_linux.go
Auto-merging testutil/daemon/daemon.go
error: could not apply 22c02219de... Bridge: on network delete, make sure it's deleted from store

If a bridge network can't be restored from the store on startup, then it's deleted, the daemon and bridge driver get out of step. If that happens to the default bridge, the daemon can't recover, it won't start again.

See the issue for more detailed description/analysis.

The ipvlan/macvlan/overlay network drivers don't seem to be affected by an equivalent issue.

This is a very long standing issue, but perhaps provoked by the checks on kernel module loading added in 27.x. (The version label on the PR is arbitrary, just something-old.)

- How I did it

When deleting a network the bridge driver doesn't know about, make sure it's not still lurking in the data store.

- How to verify it

New tests.

- Description for the changelog

- Fixed an issue that could persistently prevent daemon startup after failure to initialize the default bridge.

Also make it Linux-only, as the bridge driver is Linux only and
all of the tests had skips for Windows.

Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit 24f53eb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Rob Murray <rob.murray@docker.com>
(cherry picked from commit 22c0221)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah merged commit e0b88bc into moby:27.x Jan 20, 2025
149 checks passed
@thaJeztah thaJeztah deleted the 27.x_backport_bridge_startup_error branch January 20, 2025 10:53
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.

2 participants