network `-opt parent` is not working rootless (failed to lookup master, link not found)

Open
#4,276 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go, linux
Domain
cli, networking

Research direction

Start with the rootless network configuration at ~/.config/cni/net.d/default/nerdctl-hadron-ip-v6.conflist and reproduce the failure with the provided nerdctl network create and container run commands. Compare the configured ipvlan parent wlan0 with the reported ip addr output and investigate the CNI setup path involved in rootless networking. Done means the container starts successfully on the parent network without the failed-to-lookup-master error.

Written by the indexing model from the issue text.

Description

kind/unconfirmed-bug-claim
Description

Cannot start a container using a network with a parent (on an rpi)

Steps to reproduce the issue

Pretty much (output simplified):

nerdctl container run -d --ip 10.0.2.143 --network hadron-ip-v6    dubodubonduponey/dns:bookworm-2024-09-01

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 createRuntime hook #0: exit status 1, stdout: , stderr: time="2025-05-20T20:20:00-07:00" level=fatal msg="failed to call cni.Setup: plugin type=\"ipvlan\" failed (add): failed to lookup master \"wlan0\": Link not found"

ip addr:

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d8:3a:dd:75:c1:43 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.249/24 brd 10.0.2.255 scope global dynamic noprefixroute wlan0
       valid_lft 82812sec preferred_lft 82812sec
    inet6 fe80::74ce:47c7:e349:3441/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
nerdctl network inspect hadron-ip-v6
[
    {
        "Name": "hadron-ip-v6",
        "Id": "f8512deafa27f2603bcbbf6641662a6d4517dc003f5176837d83f2217087ea0b",
        "IPAM": {},
        "Labels": {
            "org.hadron.core.version": "v0.1-dev",
            "org.hadron.plan.description": "some_plan_descriptor",
            "org.hadron.plan.name": "plan_name",
            "org.hadron.plan.sha": "167cb4ac9e400b9bbf819ca86a118e7fb446085a3377244bb74b6e6aa88656b7",
            "org.hadron.plan.tag": "2025/05/20-20:09:06-91D8F25B-1C13-4F1B-8E8C-E7EA99F89BDC"
        },
        "Containers": {}
    }
]

Network was created with:

nerdctl network create --driver ipvlan --ipv6 --ipam-driver dhcp --opt parent=wlan0  hadron-ip-v6

From the look of it, I assume it is a cni plugins issue.

Note that:

cat ~/.config/cni/net.d/default/nerdctl-hadron-ip-v6.conflist
{
  "cniVersion": "1.0.0",
  "name": "hadron-ip-v6",
  "nerdctlID": "f8512deafa27f2603bcbbf6641662a6d4517dc003f5176837d83f2217087ea0b",
  "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": "167cb4ac9e400b9bbf819ca86a118e7fb446085a3377244bb74b6e6aa88656b7",
    "org.hadron.plan.tag": "2025/05/20-20:09:06-91D8F25B-1C13-4F1B-8E8C-E7EA99F89BDC"
  },
  "plugins": [
    {
      "type": "ipvlan",
      "master": "wlan0",
      "ipam": {
        "daemonSocketPath": "/run/user/1000/cni/dhcp.sock",
        "provide": [
          {
            "fromArg": "NERDCTL_CNI_DHCP_HOSTNAME",
            "option": "host-name",
            "value": ""
          }
        ],
        "type": "dhcp"
      },
      "capabilities": {
        "ips": true
      }
    }
  ]
}
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containerd/nerdctl

All issues in containerd/nerdctl

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.