Skip to content

nftables: enable using env var#50049

Merged
vvoland merged 1 commit intomoby:masterfrom
robmry:nftables_env_var_enable
May 28, 2025
Merged

nftables: enable using env var#50049
vvoland merged 1 commit intomoby:masterfrom
robmry:nftables_env_var_enable

Conversation

@robmry
Copy link
Copy Markdown
Contributor

@robmry robmry commented May 22, 2025

Draft PR:

- What I did

For testing - if env var DOCKER_FIREWALL_BACKEND=nftables, and nft is available, use the nftables backend instead of nftables.

We'll need daemon options for controlling the backend, so we'll also need decide what to do about the existing options ... but this change isn't that ... it's just so we can set the env var to pick the backend for a CI run.

- How I did it

The firewalld handler is now initialised before network driver registration. So, make sure an OnReloaded callback isn't processed while the bridge driver is still setting up.

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

@robmry robmry self-assigned this May 22, 2025
@robmry robmry added kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny area/networking Networking area/testing area/networking/firewalling Networking labels May 22, 2025
Signed-off-by: Rob Murray <rob.murray@docker.com>
@robmry robmry force-pushed the nftables_env_var_enable branch from d035139 to 21a165d Compare May 28, 2025 08:57
@robmry robmry marked this pull request as ready for review May 28, 2025 08:58
@robmry robmry requested a review from tianon as a code owner May 28, 2025 08:58
@robmry robmry added this to the 29.0.0 milestone May 28, 2025
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vvoland
Copy link
Copy Markdown
Contributor

vvoland commented May 28, 2025

Do we want to have a release note for this one?

@vvoland vvoland modified the milestones: 29.0.0, 28.2.0 May 28, 2025
@thaJeztah
Copy link
Copy Markdown
Member

IIUC, (also per discussion on slack) this only allows enabling the bits that are still very much "work in progress", so not intended as user-facing change. It does no harm (without using the env-var), but likely not yet gives anything "testable" for users.

@robmry
Copy link
Copy Markdown
Contributor Author

robmry commented May 28, 2025

Do we want to have a release note for this one?

Probably not ... the nftables implementation is still all queuing up for review, so the env-var doesn't actually do much yet (apart from make it easier to write tests and run nftables in the upcoming commits).

@vvoland vvoland merged commit 0e2cc22 into moby:master May 28, 2025
160 checks passed
@robmry robmry deleted the nftables_env_var_enable branch May 29, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/networking/firewalling Networking area/networking Networking area/testing kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants