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

Bug 1878565

Summary: Two different SriovNetworkNodePolicy with the same resource name doesn't work
Product: OpenShift Container Platform Reporter: Sai Sindhur Malleni <smalleni>
Component: NetworkingAssignee: zenghui.shi <zshi>
Networking sub component: SR-IOV QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: dblack, zshi
Version: 4.5   
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:40:12 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 Sai Sindhur Malleni 2020-09-14 01:49:44 UTC
Description of problem:

In my OCP 4.5.8, when I try to create two different SriovNetworkNodePolicy with the same resourceName in the spec it does not quite work.

The two networkpolicies are as follows:
=======================================================

apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: policy-intel
  namespace: openshift-sriov-network-operator
spec:
  deviceType: netdevice
  mtu: 1500
  nicSelector:
    deviceID: "158b"
    rootDevices:
     - 0000:62:00.0
    vendor: "8086"
    pfNames:
     - ens2f0
  nodeSelector:
    feature.node.kubernetes.io/network-sriov-1: "true"
  numVfs: 64
  resourceName: intelnics
=============================================================
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: policy-intel-1
  namespace: openshift-sriov-network-operator
spec:
  deviceType: netdevice
  mtu: 1500
  nicSelector:
    deviceID: "158b"
    rootDevices:
     - 0000:64:00.0
    vendor: "8086"
    pfNames:
     - ens2f0
  nodeSelector:
    feature.node.kubernetes.io/network-sriov-2: "true"
  numVfs: 64
  resourceName: intelnics


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

How reproducible:
100%

Steps to Reproduce:
1. Install SR-IOV Operator
2.Create two sriovnetworknodepolicy with the same resourceName
3.

Actual results:
Two different sriovnetworknode policies with the same resourceName doesn't work


Expected results:
This should work.


Additional info:

Comment 2 zhaozhanqi 2020-09-22 03:22:06 UTC
Verified this bug on 4.6.0-202009211504.p0

1. 
cat mlx277-netdevice 
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: mlx277-netdevice
  namespace: openshift-sriov-network-operator
spec:
  mtu: 1500
  nicSelector:
    pfNames:
      - ens2f0
    rootDevices:
      - '0000:60:00.0'
    vendor: '15b3'
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: 'true'
  numVfs: 2
  resourceName: mlx277netdevice

cat mlx278-netdevice 
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: mlx278-netdevice
  namespace: openshift-sriov-network-operator
spec:
  mtu: 1500
  nicSelector:
    pfNames:
      - ens3f0
    rootDevices:
      - '0000:5e:00.0'
    vendor: '15b3'
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: 'true'
  numVfs: 2
  resourceName: mlx277netdevice

2. Create above two policy file with same resourceName
3. Check the node info 'openshift.io/mlx277netdevice: "4"

Comment 5 errata-xmlrpc 2020-10-27 16:40:12 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