Bug 1756669 - [sriov]The deviceID of PF should be convert to VF device ID in the device-plugin-config
Summary: [sriov]The deviceID of PF should be convert to VF device ID in the device-plu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.2.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: 4.3.0
Assignee: Peng Liu
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks: 1756671 1759394
TreeView+ depends on / blocked
 
Reported: 2019-09-29 04:00 UTC by zhaozhanqi
Modified: 2020-05-13 21:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1756671 1759394 (view as bug list)
Environment:
Last Closed: 2020-05-13 21:25:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift sriov-network-operator pull 87 0 'None' closed BUG 1756669: Always use PF device ID in NIC selector 2020-10-28 13:24:21 UTC
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-05-13 21:26:03 UTC

Description zhaozhanqi 2019-09-29 04:00:12 UTC
Description of problem:
When created one sriovnetworknodepolicies without 'deviceID' specified since it's not mandatory. Check the configmap device-plugin-config. the deviceID did not be set.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Install the bm cluster and installed the sriov operator 
2. Create one SriovNetworkNodePolicy with below:
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: intel-netdevice
  namespace: sriov-network-operator
spec:
  deviceType: netdevice
  mtu: 1500
  nicSelector:
    pfNames:
      - ens1f0
    rootDevices:
      - '0000:3b:00.0'
    vendor: '8086'
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: 'true'
  numVfs: 6
  priority: 99
  resourceName: intelnetdevice
3. Check the configmap device-plugin-config
  oc get configmap -n sriov-network-operator device-plugin-config -o yaml
4. Added the deviceID with 
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: intel-netdevice
  namespace: sriov-network-operator
spec:
  deviceType: netdevice
  mtu: 1500
  nicSelector:
    pfNames:
      - ens1f0
    rootDevices:
      - '0000:3b:00.0'
    vendor: '8086'
    deviceID: '158b'
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: 'true'
  numVfs: 6
  priority: 99
  resourceName: intelnetdevice

5. check the configmap device-plugin-config again:

Actual results:
step 3:
do not see the 'deviceID' in the 
oc get configmap -n sriov-network-operator device-plugin-config -o yaml
apiVersion: v1
data:
  config.json: '{"resourceList":[{"resourceName":"intelnetdevice","IsRdma":false,"selectors":{"vendors":["8086"],"drivers":["iavf","mlx5_core","i40evf","ixgbevf"],"pfNames":["ens1f0"]}}]}'
kind: ConfigMap
metadata:
  creationTimestamp: "2019-09-27T08:34:17Z"
  name: device-plugin-config
  namespace: sriov-network-operator
  resourceVersion: "16736940"
  selfLink: /api/v1/namespaces/sriov-network-operator/configmaps/device-plugin-config
  uid: 984786cb-e101-11e9-9b82-3cfdfeba0aa4


step 5 the devices is '158b'
 oc get configmap -n sriov-network-operator device-plugin-config -o yaml
apiVersion: v1
data:
  config.json: '{"resourceList":[{"resourceName":"intelnetdevice","IsRdma":false,"selectors":{"vendors":["8086"],"devices":["158b"],"drivers":["iavf","mlx5_core","i40evf","ixgbevf"],"pfNames":["ens1f0"]}}]}'
kind: ConfigMap
metadata:
  creationTimestamp: "2019-09-27T08:34:17Z"
  name: device-plugin-config
  namespace: sriov-network-operator
  resourceVersion: "16756922"
  selfLink: /api/v1/namespaces/sriov-network-operator/configmaps/device-plugin-config
  uid: 984786cb-e101-11e9-9b82-3cfdfeba0aa4
:

Expected results:

step 3:The 'deviceID' should be added with VF device ID in the configmap
step 5: the devices should be VF deviceID not PF deviceID.

Additional info:

Comment 5 zhaozhanqi 2019-11-06 03:21:04 UTC
Verified this bug on 4.3.0-0.nightly-2019-10-31-003134 with sriov operator images

quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.3.0-201911010555-ose-sriov-network-operator

oc get cm device-plugin-config -o yaml
apiVersion: v1
data:
  config.json: '{"resourceList":[{"resourceName":"intelnetdevice","IsRdma":false,"selectors":{"vendors":["8086"],"devices":["154c"],"drivers":["iavf","mlx5_core","i40evf","ixgbevf"],"pfNames":["ens1f0"]}}]}'
kind: ConfigMap
metadata:
  creationTimestamp: "2019-11-01T10:39:48Z"
  name: device-plugin-config
  namespace: openshift-sriov-network-operator
  resourceVersion: "3160680"
  selfLink: /api/v1/namespaces/openshift-sriov-network-operator/configmaps/device-plugin-config
  uid: fe7af25a-1382-48ae-b428-b4c1d43b77e1

Comment 7 errata-xmlrpc 2020-05-13 21:25:59 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, 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/RHBA-2020:0062


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