Bug 1771233

Summary: [sirov] The 'priority' in SriovNetworkNodePolicy should be able to be added if it do not be set
Product: OpenShift Container Platform Reporter: zhaozhanqi <zzhao>
Component: NetworkingAssignee: Peng Liu <pliu>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium    
Version: 4.3.0   
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-23 11:12:18 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 zhaozhanqi 2019-11-12 02:23:33 UTC
Description of problem:
Create one SriovNetworkNodePolicy CR without 'priority' as below. The parameter can not be found after the CR is created.

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

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


How reproducible:


Steps to Reproduce:
1. setup the sriov operator
2. Create one SriovNetworkNodePolicy CR without 'priority'
3. Check the SriovNetworkNodePolicy

Actual results:

step 3:

oc get SriovNetworkNodePolicy without-netdevice -o yaml
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  creationTimestamp: "2019-11-11T08:47:25Z"
  generation: 1
  name: without-netdevice
  namespace: openshift-sriov-network-operator
  resourceVersion: "11936931"
  selfLink: /apis/sriovnetwork.openshift.io/v1/namespaces/openshift-sriov-network-operator/sriovnetworknodepolicies/without-netdevice
  uid: e370fee0-9a7c-4184-a3e0-b237610e24b2
spec:
  deviceType: netdevice
  mtu: 1500
  nicSelector:
    pfNames:
    - ens3f1
    rootDevices:
    - 0000:5e:00.1
    vendor: 15b3
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: "true"
  numVfs: 2
  resourceName: withoutnetdevice

Expected results:

priority should be added 

Additional info:

Comment 2 zhaozhanqi 2019-11-14 08:39:02 UTC
Verified this bug quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.3.0-201911132228-ose-sriov-network-operator

oc get sriovnetworknodepolicy without-netdevice -o yaml
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  creationTimestamp: "2019-11-14T08:30:05Z"
  generation: 1
  name: without-netdevice
  namespace: openshift-sriov-network-operator
  resourceVersion: "36088"
  selfLink: /apis/sriovnetwork.openshift.io/v1/namespaces/openshift-sriov-network-operator/sriovnetworknodepolicies/without-netdevice
  uid: b91b056c-6c0f-494c-80f8-1db433243370
spec:
  deviceType: netdevice
  mtu: 1500
  nicSelector:
    pfNames:
    - ens3f1
    rootDevices:
    - 0000:5e:00.1
    vendor: 15b3
  nodeSelector:
    feature.node.kubernetes.io/sriov-capable: "true"
  numVfs: 2
  priority: 99
  resourceName: withoutnetdevice

Comment 4 errata-xmlrpc 2020-01-23 11:12:18 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:0062