Skip to content
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

nerdctl run - failed to add the address (failed to add the address 10.4.0.17/32 to trusted zone: Not Authorized(uid): org.fedoraproject.FirewallD1.config) #2818

Closed
AkihiroSuda opened this issue Feb 14, 2024 Discussed in #2090 · 3 comments · Fixed by #2819
Labels
area/network area/rootless Rootless mode bug Something isn't working priority/high

Comments

@AkihiroSuda
Copy link
Member

AkihiroSuda commented Feb 14, 2024

Discussed in #2090

Originally posted by nealef March 10, 2023
When running nerdctl run in rootless mode I fail with:

FATA[0000] failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2023-03-09T21:29:12-05:00" level=fatal msg="failed to call cni.Setup: plugin type=\"firewall\" failed (add): failed to add the address 10.4.0.17/32 to trusted zone: Not Authorized(uid): org.fedoraproject.FirewallD1.config"

Have I missed a configuration step?

This seems to happen when firewalld is running.
A workaround is to disable firewalld (sudo systemctl stop firewalld) and use another firewall.

Confirmed on Ubuntu 23.10, Rocky Linux 9.3, etc. with nerdctl v2.0.0-beta.0, CNI firewall plugin v1.4.0.
Rootful mode is not affected.

@AkihiroSuda AkihiroSuda added bug Something isn't working area/rootless Rootless mode area/network priority/high labels Feb 14, 2024
@AkihiroSuda
Copy link
Member Author

This seems to fix the issue

--- /home/suda.linux/.config/cni/net.d/nerdctl-bridge.conflist.bak	2024-02-14 17:27:37.281279702 +0900
+++ /home/suda.linux/.config/cni/net.d/nerdctl-bridge.conflist	2024-02-14 17:30:16.410469639 +0900
@@ -37,7 +37,8 @@
     },
     {
       "type": "firewall",
-      "ingressPolicy": "same-bridge"
+      "ingressPolicy": "same-bridge",
+      "backend": "iptables"
     },
     {
       "type": "tuning"

@fahedouch
Copy link
Member

iptables

@AkihiroSuda could you please explain why it works with iptables backend ?

@AkihiroSuda
Copy link
Member Author

Because it doesn't talk to firewalld, and iptables still work inside the netns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/network area/rootless Rootless mode bug Something isn't working priority/high
Projects
None yet
2 participants