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

failed to create macvlan: invalid argument #1017

Open
mupeifeiyi opened this issue Aug 1, 2024 · 2 comments
Open

failed to create macvlan: invalid argument #1017

mupeifeiyi opened this issue Aug 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@mupeifeiyi
Copy link

kubernetes version: 1.21.14
network-operator: 23.10
The operator configuration is as follows, and the others are default

deployCR: true
rdmaSharedDevicePlugin:
  deploy: true
  image: k8s-rdma-shared-dev-plugin
  repository: ghcr.io/mellanox
  version: sha-fe7f371c7e1b8315bf900f71cd25cfc1251dc775
  useCdi: false
  resources:
    - name: mlx5_1
      vendors: [15b3]
      rdmaHcaMax: 63
      ifNames: [ib1]
    - name: mlx5_2
      vendors: [15b3]
      rdmaHcaMax: 63
      ifNames: [ib2]
    - name: mlx5_3
      vendors: [15b3]
      rdmaHcaMax: 63
      ifNames: [ib3]
    - name: mlx5_4
      vendors: [15b3]
      rdmaHcaMax: 63
      ifNames: [ib4]

create MacvlanNetwork

apiVersion: mellanox.com/v1alpha1
kind: MacvlanNetwork
metadata:
  name: rdma-net-ipam-ib1
spec:
  ipam: |
    {
      "type": "whereabouts",
      "range": "10.10.0.0/24",
      "gateway": "10.10.0.1"
    }
  master: ib1
  mode: bridge
  mtu: 1500
  networkNamespace: default

create pod

apiVersion: v1
kind: Pod
metadata:
  name: mofed-test-pod1
  annotations:
    k8s.v1.cni.cncf.io/networks: rdma-net-ipam-ib1
spec:
  nodeName: dixi-8ib-05
  restartPolicy: OnFailure
  containers:
  - image: 172.16.16.66/laiye-foundry/mofed:23.10-1.1.9.0-ubuntu20.04-amd64
    name: mofed-test-ctr
    securityContext:
      capabilities:
        add: [ "IPC_LOCK" ]
    resources:
      limits:
        rdma/mlx5_1: 1
      requests:
        rdma/mlx5_1: 1

The error message is as follows:
kubelet (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "788de7e085b7b935f160ffeaab972ec071b71febc3f686a5b9936c9b58888bf4" network for pod "mofed-test-pod1": networkPlugin cni failed to set up pod "mofed-test-pod1_default" network: [default/mofed-test-pod1/:rdma-net-ipam-ib1]: error adding container to network "rdma-net-ipam-ib1": failed to create macvlan: invalid argument

@mupeifeiyi mupeifeiyi added the bug Something isn't working label Aug 1, 2024
@mupeifeiyi
Copy link
Author

IB info:

# ibdev2netdev 
mlx5_1 port 1 ==> ib1 (Up)

# ibstat
CA 'mlx5_1'
	CA type: MT4129
	Number of ports: 1
	Firmware version: 28.39.2048
	Hardware version: 0
	Node GUID: 0x58a2e10300a54e6e
	System image GUID: 0x58a2e10300a54e6e
	Port 1:
		State: Active
		Physical state: LinkUp
		Rate: 400
		Base lid: 41
		LMC: 0
		SM lid: 178
		Capability mask: 0xa751e848
		Port GUID: 0x58a2e10300a54e6e
		Link layer: InfiniBand

@mupeifeiyi
Copy link
Author

I think I understand a little bit, when using IB directly without using rocev2, there is no need to use macvlan, so how can I use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant