CNI bridge: `failed (add): failed to set bridge addr: could not set bridge's mac: invalid argument`
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- go
- Domain
- networking
Research direction
Start with the CNI bridge ensureAddr function and the netlink.Attrs path mentioned in the report, using the supplied hadron-bridge configuration as context. First obtain a reproducible case with host information, then verify that bridge setup completes instead of returning the invalid-argument MAC error.
Written by the indexing model from the issue text.
Description
Description
I do not have a simple reproducer for this.
This is just regularly popping up with custom deployment tooling as part of a large plan.
sudo nerdctl container run -d --name dns --hostname dns-magnetar.local --read-only --restart always --cap-add NET_BIND_SERVICE --env LOG_LEVEL=info --env DNS_STUFF_MDNS=false --network hadron-bridge --publish 4242:4242/tcp --volume data-dns:/magnetar/user/data --label org.hadron.core.version=v0.1-dev --label org.hadron.plan.description=some_plan_descriptor --label org.hadron.plan.name=plan_name --label org.hadron.plan.sha=7841eb9910d7b9d49f49e5940a73ca9d9a0dd6c4975640fd5eea4b39f5376744 --label org.hadron.plan.tag=2025/05/22-14:06:09-2EF02181-EF3C-4E68-9218-3C66599DC459 dubodubonduponey/dns:bookworm-2024-09-01
failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running createRuntime hook #0: exit status 1, stdout: , stderr: time=\"2025-05-22T14:06:52-07:00\" level=fatal msg=\"failed to call cni.Setup: plugin type=\\\"bridge\\\" failed (add): failed to set bridge addr: could not set bridge's mac: invalid argument\""
Network is:
{
"cniVersion": "1.0.0",
"name": "hadron-bridge",
"nerdctlID": "f510b1557a7a8a34b10de53d186d9f44ae3ac06983994403aae8364fb6e4c6b6",
"nerdctlLabels": {
"org.hadron.core.version": "v0.1-dev",
"org.hadron.plan.description": "some_plan_descriptor",
"org.hadron.plan.name": "plan_name",
"org.hadron.plan.sha": "cae39eec27f94285311914ffe6af492685fd5b162ef41c7f55fdbd8e75183138",
"org.hadron.plan.tag": "2025/05/20-17:15:29-CC9CCD90-E6ED-4735-B34D-5570D3431248"
},
"plugins": [
{
"type": "bridge",
"bridge": "br-f510b1557a7a",
"isGateway": true,
"ipMasq": true,
"hairpinMode": true,
"ipam": {
"ranges": [
[
{
"gateway": "10.4.1.1",
"subnet": "10.4.1.0/24"
}
]
],
"routes": [
{
"dst": "0.0.0.0/0"
}
],
"type": "host-local"
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
},
{
"type": "firewall",
"ingressPolicy": "same-bridge"
},
{
"type": "tuning"
}
]
}
The error comes (obviously) from CNI bridge (func ensureAddr(br netlink.Link, family int, ipn *net.IPNet, forceAddress bool) error {), and suggests that netlink.Attrs in certain circumstances fails to produce an actual hardware addr.
Steps to reproduce the issue
na
Describe the results you received and expected
Work.
What version of nerdctl are you using?
main
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
None
Host information
No response
- Dominant language
- Go
- Stars
- 10.5k
- Forks
- 853
- Avg merge
- 6d 14h
- Merged PRs (30d)
- 38
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from containerd/nerdctl
-
Test and examples: update wordpress images (to silence potential false security alerts)Possibly taken @Guurdeep claimed this 20 days ago. Openarea/ci documentation priority/low
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
containerd/nerdctl#5283 · 2 comments ·
Maintainers usually reply within 3 days
-
`nerdctl kill` shouldn't set `containerd.io/restart.explicitly-stopped` label for non-stop signalsMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
containerd/nerdctl#5171 · 3 comments ·
Maintainers usually reply within 3 days
-
area/project
Difficulty 1/5 Under an hour Newbie friendliness 25/100
containerd/nerdctl#5383 · 5 comments ·
Maintainers usually reply within 3 days
-
Restart-policy containers loop on "unable to apply apparmor profile" after reboot until the creating user logs in (OCI hook inherits the client's XDG_RUNTIME_DIR)Possibly taken @Shubhranshu153 claimed this today. Openarea/rootless bug
Difficulty 3/5 1-2 days Newbie friendliness 72/100
containerd/nerdctl#5377 · 1 assignee ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
containerd/nerdctl#5355 ·
Maintainers usually reply within 3 days
All issues in containerd/nerdctl
Similar issues
-
P3 tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
kind/feature needs-triage priority/unprioritized
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NVIDIA/k8s-test-infra#1504 ·
Maintainers usually reply within 1 day
-
Area/Infrastructure Aspect/Infra Resources Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wso2/agent-manager#2717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
open-policy-agent/opa#9685 · 1 comment ·
Maintainers usually reply within 1 day