Bug 2004146 - Need Device plugin configuration for the NIC "needVhostNet" & "isRdma"
Summary: Need Device plugin configuration for the NIC "needVhostNet" & "isRdma"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
: 4.9.0
Assignee: Sebastian Scheinkman
QA Contact: Ying Wang
URL:
Whiteboard:
Depends On: 1983964
Blocks: 2011435
TreeView+ depends on / blocked
 
Reported: 2021-09-14 15:03 UTC by OpenShift BugZilla Robot
Modified: 2021-10-18 17:51 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:51:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift sriov-network-operator pull 565 0 None open [release-4.9] Bug 2004146: Support vhost ocp 2021-09-14 15:03:32 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:51:49 UTC

Comment 4 Ying Wang 2021-09-23 09:26:59 UTC
Added "needVhostNet": true for Intel NIC and added "needVhostNet": true and "isRdma": true for Mellanox NIC, creating sriovnetworknodepolicy, these parameters can be shown in description.

[root@dell-per740-36 yingwang]# cat mlx277netpolicy1.yaml 
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: mlx277netpolicy1
  namespace: openshift-sriov-network-operator
spec:
  mtu: 1800
  isRdma: true
  needVhostNet: true
  nicSelector:
    deviceID: '1015'
    pfNames:
      - ens2f0
    vendor: '15b3'
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: 'true'
  numVfs: 10
  resourceName: mlx277netpolicy1
[root@dell-per740-36 yingwang]# cat intelpolicyens1f0.yaml 
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: intelpolicyens1f0
  namespace: openshift-sriov-network-operator
spec:
  deviceType: netdevice
  needVhostNet: true
  nicSelector:
    deviceID: '158b'
    pfNames:
      - ens1f0
    rootDevices:
      - '0000:3b:00.0'
    vendor: '8086'
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: 'true'
  numVfs: 5
  priority: 99
  resourceName: intelpolicyens1f0
[root@dell-per740-36 yingwang]# oc describe sriovnetworknodepolicies.sriovnetwork.openshift.io mlx277netpolicy1 
Name:         mlx277netpolicy1
Namespace:    openshift-sriov-network-operator
Labels:       <none>
Annotations:  <none>
API Version:  sriovnetwork.openshift.io/v1
Kind:         SriovNetworkNodePolicy
Metadata:
  Creation Timestamp:  2021-09-23T08:55:16Z
  Generation:          1
  Managed Fields:
    API Version:  sriovnetwork.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
        .:
        f:isRdma:
        f:mtu:
        f:needVhostNet:
        f:nicSelector:
          .:
          f:deviceID:
          f:pfNames:
          f:vendor:
        f:nodeSelector:
          .:
          f:feature.node.kubernetes.io/sriov-capable:
        f:numVfs:
        f:resourceName:
    Manager:         kubectl-create
    Operation:       Update
    Time:            2021-09-23T08:55:16Z
  Resource Version:  412656
  UID:               61dc983e-15ba-4546-bbb5-20f1defe3ef3
Spec:
  Device Type:     netdevice
  Is Rdma:         true
  Link Type:       eth
  Mtu:             1800
  Need Vhost Net:  true
  Nic Selector:
    Device ID:  1015
    Pf Names:
      ens2f0
    Vendor:  15b3
  Node Selector:
    feature.node.kubernetes.io/sriov-capable:  true
  Num Vfs:                                     10
  Priority:                                    99
  Resource Name:                               mlx277netpolicy1
Events:                                        <none>
[root@dell-per740-36 yingwang]# oc describe sriovnetworknodepolicies.sriovnetwork.openshift.io intelpolicyens1f0 
Name:         intelpolicyens1f0
Namespace:    openshift-sriov-network-operator
Labels:       <none>
Annotations:  <none>
API Version:  sriovnetwork.openshift.io/v1
Kind:         SriovNetworkNodePolicy
Metadata:
  Creation Timestamp:  2021-09-23T09:18:53Z
  Generation:          1
  Managed Fields:
    API Version:  sriovnetwork.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
        .:
        f:deviceType:
        f:needVhostNet:
        f:nicSelector:
          .:
          f:deviceID:
          f:pfNames:
          f:rootDevices:
          f:vendor:
        f:nodeSelector:
          .:
          f:feature.node.kubernetes.io/sriov-capable:
        f:numVfs:
        f:priority:
        f:resourceName:
    Manager:         kubectl-create
    Operation:       Update
    Time:            2021-09-23T09:18:53Z
  Resource Version:  420772
  UID:               e31cc0e4-21ee-469d-aa0c-3ff68f20a5cb
Spec:
  Device Type:     netdevice
  Is Rdma:         false
  Link Type:       eth
  Need Vhost Net:  true
  Nic Selector:
    Device ID:  158b
    Pf Names:
      ens1f0
    Root Devices:
      0000:3b:00.0
    Vendor:  8086
  Node Selector:
    feature.node.kubernetes.io/sriov-capable:  true
  Num Vfs:                                     5
  Priority:                                    99
  Resource Name:                               intelpolicyens1f0
Events:                                        <none>


[root@dell-per740-36 yingwang]# oc version
Client Version: 4.8.0-0.nightly-2021-04-23-131610
Server Version: 4.9.0-rc.1
Kubernetes Version: v1.22.0-rc.0+75ee307
[root@dell-per740-36 yingwang]# oc get csv -n openshift-sriov-network-operator 
NAME                                        DISPLAY                   VERSION              REPLACES   PHASE
sriov-network-operator.4.9.0-202109210853   SR-IOV Network Operator   4.9.0-202109210853              Succeeded

Comment 5 Ying Wang 2021-09-23 12:48:15 UTC
created pods and attached Mellanox and intel VFs, and checked /dev/vhost-net was present in container.

[root@dell-per740-36 yingwang]# oc get pods
NAME             READY   STATUS    RESTARTS   AGE
sriov-testpod    1/1     Running   0          12s
sriovpod-inetl   1/1     Running   0          5s
[root@dell-per740-36 yingwang]# oc exec sriov-testpod -it bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
bash-5.0# 
bash-5.0# 
bash-5.0# ls /dev/vhost-net
/dev/vhost-net

bash-5.0# exit
exit
[root@dell-per740-36 yingwang]# oc exec sriovpod-inetl -it bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
bash-5.0# 
bash-5.0# ls /dev/vhost-net
/dev/vhost-net
bash-5.0#

Comment 6 meng-maggie.xu@nokia-sbell.com 2021-09-24 02:34:28 UTC
just to confirm, so it will be aupported in OCP4.9 right?

Comment 7 zhaozhanqi 2021-09-27 07:19:13 UTC
(In reply to meng-maggie.xu from comment #6)
> just to confirm, so it will be aupported in OCP4.9 right?

yes

Comment 10 errata-xmlrpc 2021-10-18 17:51:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759


Note You need to log in before you can comment on or make changes to this bug.