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

"device or resource busy" error from netlink when creating macvlan device #1339

Open
dudeisbrendan03 opened this issue Sep 22, 2024 · 0 comments

Comments

@dudeisbrendan03
Copy link

dudeisbrendan03 commented Sep 22, 2024

Hi there,
I have multiple NetworkAttachmentDefinitions, mostly using IPVLAN L2 bridges.

I tried to convert one of my IPVLAN bridges to MACVLAN, as there is a workload that functions as a gateway for another workload that terminates some tunnelled traffic.

Issue is I need to utilise MACVLAN for L2 routing at the gateway, when I changed it from IPVLAN/L2 to MACVLAN/Bridge I got the error "device or resource busy" from netlink when trying to attack the interface, I assumed this was because I modified an existing NAD- so I deleted and recreated it as an ipvlan resource.

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: br-n6
  namespace: phoenix
spec:
  config: >-
    {"cniVersion":"0.3.1","type":"ipvlan","master":"ens20","mode":"l2","ipam":{"type":"host-local","ranges":[[{"subnet":"192.168.15.0/24","rangeStart":"192.168.15.10","rangeEnd":"192.168.15.253","gateway":"192.168.15.1"}]]}}
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
  name: br-n6
  namespace: phoenix
spec:
  config: >-
    {"cniVersion":"0.3.1","type":"macvlan","master":"ens20","mode":"bridge","ipam":{"type":"host-local","ranges":[[{"subnet":"192.168.15.0/24","rangeStart":"192.168.15.10","rangeEnd":"192.168.15.253","gateway":"192.168.15.1"}]]}}

This did not resolve the issue, and I am still unable to create any MACVLAN devices in my cluster.


Each node in the cluster is identical, including interface names and the networks behind them.

I'm wondering if modifying the resource meant that something wasn't cleaned up properly, or is there a restriction on utilising different types of bridges (since existing IPVLAN bridges exist on the same interface).

Attempting to create a macvlan device myself on any of the nodes in the cluster results in the same issue

❯ sudo ip link add testmacvlan1 link ens20 type macvlan mode bridge
RTNETLINK answers: Device or resource busy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant