Bug 1832728 - [sriov] The sriov network operator shall only allow user to configure the supported NIC models
Summary: [sriov] The sriov network operator shall only allow user to configure the sup...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Peng Liu
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-07 08:07 UTC by Peng Liu
Modified: 2020-07-13 17:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:35:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift sriov-network-operator pull 204 0 None closed Bug 1832728: Use operator webhook to prevent users from configuring unsupported de… 2021-02-02 04:44:14 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:35:57 UTC

Description Peng Liu 2020-05-07 08:07:12 UTC
Description of problem:
Currently, when users want to config a NIC selector with vendorID, deviceID, those fields in the `nicSelector` are only validated individually against the CRD, which is not sufficient. Users bypass the validation by 1) only specifying the pfName, or 2) using the combination of Intel vendorID plus a mellanox NIC deviceID, or vice versa.

We need to let the operator admission controller validate the NIC models with venderID/deviceID tuple, in order to block users from configuring unsupported NIC models.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
With sriov operator admission controller enable, policy CR which configures the unsupported NIC model will be rejected.

Additional info:

Comment 3 zhaozhanqi 2020-05-18 09:21:55 UTC
Verified this bug on 4.5.0-202005161517

oc create -f non-vondor 
Error from server (vendor 15b4 is not supported): error when creating "non-vondor": admission webhook "operator-webhook.sriovnetwork.openshift.io" denied the request: vendor 15b4 is not supported
[root@hp-dl388g9-03 wrong-yaml]# 

oc create -f non-deviceid
Error from server (no matched NIC is selected by the nicSelector in CR without-netdevice): error when creating "non-deviceid": admission webhook "operator-webhook.sriovnetwork.openshift.io" denied the request: no matched NIC is selected by the nicSelector in CR without-netdevice

Comment 4 errata-xmlrpc 2020-07-13 17:35:44 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:2409


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