+++ 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:
The deviceID shall not be set in the configmap if user don't specifiy it in the sriovnetworknodepolicies. This is by design. '