Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1866618

Summary: [sriov] Operator admission webhook always set 'deviceType' to 'netDevice
Product: OpenShift Container Platform Reporter: Peng Liu <pliu>
Component: NetworkingAssignee: Peng Liu <pliu>
Networking sub component: SR-IOV QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified    
Version: 4.6   
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:25:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peng Liu 2020-08-06 04:56:49 UTC
Description of problem:
Operator admission webhook always set 'deviceType' to 'netDevice

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


How reproducible:


Steps to Reproduce:
1. Create the following SriovNetworkNodePolicy CR
---
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: policy-net-2
spec:
  resourceName: nic2
  nodeSelector:
    feature.node.kubernetes.io/network-sriov.capable: "true"
  priority: 51
  mtu: 1500
  numVfs: 4
  nicSelector:
    pfNames: ['ens803f0']
  deviceType: vfio-pci

2.
3.

Actual results:
# oc get sriovnetworknodepolicy policy-net-2 -o yaml
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
...
spec:
  deviceType: netdevice
  linkType: eth
  mtu: 1500
  nicSelector:
    pfNames:
    - ens803f0
  nodeSelector:
    feature.node.kubernetes.io/network-sriov.capable: "true"
  numVfs: 4
  priority: 51
  resourceName: nic2

Expected results:
# oc get sriovnetworknodepolicy policy-net-2 -o yaml
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
...
spec:
  deviceType: vfio-pci
  linkType: eth
  mtu: 1500
  nicSelector:
    pfNames:
    - ens803f0
  nodeSelector:
    feature.node.kubernetes.io/network-sriov.capable: "true"
  numVfs: 4
  priority: 51
  resourceName: nic2

Additional info:
Workaround is to disable the operator admission webhook.

Comment 6 errata-xmlrpc 2020-10-27 16:25:22 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 (OpenShift Container Platform 4.6 GA Images), 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:4196