Mellanox / docker-sriov-plugin

Docker networking plugin for SRIOV and passthrough interfaces
Apache License 2.0
80 stars 19 forks source link

Error: unsupported driver sriov: invalid argument on Podman #20

Open psaini79 opened 2 years ago

psaini79 commented 2 years ago

We are testing Mellanox driver on Podman and getting following error:

# podman network create -d sriov --subnet=192.168.0.0/20 -o netdevice=re0 -o prefix=roc mynet
Error: unsupported driver sriov: invalid argument

We are testing this configuration on following env:

# uname -r
5.4.17-2136.305.1.el8uek.x86_64
# cat /etc/oracle-release
Oracle Linux Server release 8.5
# cat /etc/oracle-release
Oracle Linux Server release 8.5
# podman info
host:
  arch: amd64
  buildahVersion: 1.24.1
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - hugetlb
  - pids
  - rdma
  cgroupManager: systemd
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.0-1.module+el8.6.0+20665+a3b29bef.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: 9a942873287e0edbdc580ebee0fcd4b3735244f5'
  cpus: 104
  distribution:
    distribution: '"ol"'
    variant: server
    version: "8.5"
  eventLogger: file
  hostname: scaqan18.example.info
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.17-2136.305.1.el8uek.x86_64
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 1606664781824
  memTotal: 1621456302080
  networkBackend: cni
  ociRuntime:
    name: runc
    package: runc-1.0.2-1.module+el8.5.0+20416+d687fed7.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.2
      spec: 1.0.2-dev
      go: go1.16.7
      libseccomp: 2.5.1
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_NET_RAW,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.8-2.module+el8.6.0+20665+a3b29bef.x86_64
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.1
  swapFree: 17179865088
  swapTotal: 17179865088
  uptime: 1275h 31m 29.32s (Approximately 53.12 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - container-registry.oracle.com
  - docker.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 1
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1
  runRoot: /run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.0.2
  Built: 1652749236
  BuiltTime: Mon May 16 18:00:36 2022
  GitCommit: ""
  GoVersion: go1.17.7
  OsArch: linux/amd64
  Version: 4.0.2

Steps to reproduce:

1) Create the SRIOV based container:

podman run -d -v /var/run:/var/run --net=host --privileged rdma/sriov-plugin

2) Check the container:

podman ps -a
CONTAINER ID  IMAGE                               COMMAND               CREATED             STATUS                     PORTS       NAMES
e62d9ca88f4b  docker.io/rdma/sriov-plugin:latest  /bin/docker-sriov...  About a minute ago  Exited (2) 25 seconds ago              quizzical_bohr
790393c8031b  docker.io/rdma/sriov-plugin:latest  /bin/docker-sriov...  3 seconds ago       Up 3 seconds ago                       elegant_moore

3) podman images

REPOSITORY                   TAG         IMAGE ID      CREATED      SIZE
docker.io/rdma/sriov-plugin  latest      17072d351ad6  3 years ago  67.7 MB

4) Create the Bridge

 podman network create -d sriov --subnet=192.168.0.0/20 -o netdevice=re0 -o prefix=roc mynet

You will see the error on 4th step. Do we support Mellanox driver with Podman? If yes, please share the steps. If not, what is the ETA for the Podman support?