Bug 1861341

Summary: [4.6] ptp operator install failure due to invalid CRD definition
Product: OpenShift Container Platform Reporter: huirwang
Component: NetworkingAssignee: zenghui.shi <zshi>
Networking sub component: ptp QA Contact: huirwang
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: zshi
Version: 4.6   
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:17:40 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 huirwang 2020-07-28 10:41:19 UTC
Description of problem:
ptp operator install failure due to invalid CRD definition 

Version-Release number of selected component (if applicable):
4.6.0-202007271331.p0

How reproducible:
Always

Steps to Reproduce:
 Deploy the 4.6 ptp operator following the new procedure.
 
 1. Get the 4.6 index image by https://mastern-jenkins-csb-openshift-qe.cloud.paas.psi.redhat.com/job/mirror_to_image_bundle_to_qe_registry/
 2. Create ICSP
 
$cat <<EOF  | oc create -f -
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
  name: olmcontentsourcepolicy
spec:
  repositoryDigestMirrors:
  - mirrors:
    - quay.io/openshift-qe-optional-operators/
    source: registry.redhat.io/openshift4/
EOF
3. Create CatalogSource
#!/bin/bash
QE_index_image="quay.io/openshift-qe-optional-operators/ocp4-index:latest"
cat <<EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: qe-app-registry
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: ${QE_index_image}
EOF

4. Create openshift namespace and OperatorGroup.
5. Deploy ptp-operator from web console.

Actual Result:
oc get csv -n openshift-ptp
NAME                                 DISPLAY        VERSION                 REPLACES   PHASE
ptp-operator.4.6.0-202007271331.p0   PTP Operator   4.6.0-202007271331.p0              Pending

oc get InstallPlan -n openshift-ptp -o yaml
.....

    conditions:
    - lastTransitionTime: "2020-07-28T06:56:00Z"
      lastUpdateTime: "2020-07-28T06:56:00Z"
      message: 'CustomResourceDefinition.apiextensions.k8s.io "nodeptpdevices.ptp.openshift.io"
        is invalid: spec.scope: Required value'
      reason: InstallComponentFailed
      status: "False"
      type: Installed
    phase: Failed
    
........

Expected Result:
ptp operator should install successfully.

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

Comment 6 errata-xmlrpc 2020-10-27 16:21:10 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