Bug 1756671 - [sriov]The deviceID of PF convert to VF device ID in the device-plugin-config
Summary: [sriov]The deviceID of PF convert to VF device ID in the device-plugin-config
Keywords:
Status: CLOSED NOTABUG
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: Feng Pan
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On: 1756669 1759394
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-29 04:02 UTC by zhaozhanqi
Modified: 2019-10-08 02:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1756669
Environment:
Last Closed: 2019-10-01 14:05:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhaozhanqi 2019-09-29 04:02:45 UTC
+++ This bug was initially created as a clone of Bug #1756669 +++

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 1 Peng Liu 2019-09-30 15:33:14 UTC
The deviceID shall not be set in the configmap if user don't specifiy it in the sriovnetworknodepolicies. This is by design.
'


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