Bug 1989779

Summary: Install plans permanently fail due to CRD resource modified or similar transient errors
Product: OpenShift Container Platform Reporter: Joe Lanford <jlanford>
Component: OLMAssignee: Joe Lanford <jlanford>
OLM sub component: OLM QA Contact: Bruno Andrade <bandrade>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: alkazako, anbhatta, astefanu, bandrade, bluddy, chfan, davegord, dsover, krizza, llowinge, mjobanek, tflannag
Version: 4.6.zKeywords: Triaged
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1923111
: 1989780 (view as bug list) Environment:
Last Closed: 2021-08-16 18:32:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1923111    
Bug Blocks: 1989780    

Comment 5 Bruno Andrade 2021-08-10 17:36:40 UTC
OLM version: 0.17.0
git commit: 2ab4171de3930b89b6b186724c29bffcf6f39ce2
OCP: 4.8.0-0.nightly-2021-08-09-135211

1. Install operator into a namespace (e.g 3scale from OperatorHub. This will install CRDs onto the cluster

oc get csv -n test-1           
NAME                  DISPLAY   VERSION   REPLACES   PHASE
etcdoperator.v0.9.4   etcd      0.9.4                Succeeded


2. Run some script that constantly updates the CRDs of the installed operator to mimic some event updating the CRD
```
 while true; do        
    oc patch crd etcdclusters.etcd.database.coreos.com  --type=json -p='[{"op" : "add", "path" : "/metadata/labels/test", "value": "test"}]'
    oc patch crd etcdclusters.etcd.database.coreos.com --type=json -p='[{"op" : "remove", "path" : "/metadata/labels/test"}]'
done

customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
The request is invalid
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched
customresourcedefinition.apiextensions.k8s.io/etcdclusters.etcd.database.coreos.com patched

The requests fail when an Operator is being installed

```
3. Install the same operator into a different namespace 

oc get csv --all-namespaces  
NAMESPACE                              NAME                  DISPLAY          VERSION   REPLACES              PHASE
openshift-operator-lifecycle-manager   packageserver         Package Server   0.17.0                          Succeeded
test-1                                 etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded
test-2                                 etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded
test-3                                 etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded
test-4                                 etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded


4. Inspect for failed install plan 

 oc get ip --all-namespaces                                                                                                                                                                                                          
NAMESPACE   NAME            CSV                   APPROVAL    APPROVED
test-1      install-24tfk   etcdoperator.v0.9.4   Automatic   true
test-2      install-vdfv9   etcdoperator.v0.9.4   Automatic   true
test-3      install-zrh8w   etcdoperator.v0.9.4   Automatic   true
test-4      install-8j6fj   etcdoperator.v0.9.4   Automatic   true

Comment 7 errata-xmlrpc 2021-08-16 18:32:34 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.8.5 security update), 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-2021:3121