Bug 1878565 - Two different SriovNetworkNodePolicy with the same resource name doesn't work
Summary: Two different SriovNetworkNodePolicy with the same resource name doesn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: zenghui.shi
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-14 01:49 UTC by Sai Sindhur Malleni
Modified: 2020-10-27 16:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:40:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift sriov-network-operator pull 344 0 None closed Bug 1878565: merge device plugin configs that share the same resource name 2020-12-17 22:50:30 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:40:34 UTC

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


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