Bug 1850469

Summary: Unable to upgrade SR-IOV operator to 4.5 due to CRD validation error
Product: OpenShift Container Platform Reporter: Petr Horáček <phoracek>
Component: NetworkingAssignee: Peng Liu <pliu>
Networking sub component: SR-IOV QA Contact: zhaozhanqi <zzhao>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified    
Version: 4.5   
Target Milestone: ---   
Target Release: ---   
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-06-24 12:46:52 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:
Attachments:
Description Flags
sriovnetworknodestates list none

Description Petr Horáček 2020-06-24 11:36:33 UTC
Description of problem:
While upgrade SR-IOV operator from 4.4 to 4.5 on OCP 4.5, the InstallPlan failed with:

    Message:               error validating existing CRs agains new CRD's schema: sriovnetworknodestates.sriovnetwork.openshift.io: error validating custom resource against new schema &apiextensions.CustomResourceValidation{OpenAPIV3Schema:(*apiextensions.JSONSchemaProps)(0xc000f7f600)}: [].spec.interfaces.vfGroups.policyName: Required value
    Reason:                InstallComponentFailed


Version-Release number of selected component (if applicable):
OCP 4.5
SR-IOV operator 4.4->4.5


How reproducible:
Happened 1/1.

Steps to Reproduce:
1. Subscribe to rh-verified-operators on Channel 4.4
2. Create SriovNetworkNodePolicy:
cat <<EOF | oc create -f -
---
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
  name: policy-ens2f1
  namespace: openshift-sriov-network-operator
spec:
  deviceType: vfio-pci
  nicSelector:
    rootDevices:
    - 0000:3b:00.1
    vendor: "8086"
    pfNames:
    - ens2f1
  nodeSelector:
    feature.node.kubernetes.io/network-sriov.capable: "true"
  numVfs: 5
  resourceName: sriov_net
EOF


3. Let the configuration roll out until we get the resource exposed and VFs configured
4. Change the Subscription channel to 4.5

Actual results:
InstallPlan for 4.5 reports the error I mentioned

Expected results:
InstallPlan succeeds and 4.5 is installed.

Comment 1 Petr Horáček 2020-06-24 11:40:24 UTC
Created attachment 1698574 [details]
sriovnetworknodestates list

Comment 2 Peng Liu 2020-06-24 12:33:43 UTC
Hi Petr

I think this is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1846239, which has been fixed. Could you try with the latest 4.5 build and let us know.

Comment 3 Petr Horáček 2020-06-24 12:46:52 UTC
Indeed, this works fine with the latest version from ART. Thanks.

*** This bug has been marked as a duplicate of bug 1846239 ***