Bug 1989780

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, jiazha, krizza, llowinge, mjobanek, tflannag
Version: 4.6.zKeywords: Triaged
Target Milestone: ---   
Target Release: 4.7.z   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1989779
: 1989781 (view as bug list) Environment:
Last Closed: 2021-09-29 14:10:09 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: 1989779    
Bug Blocks: 1989781    

Comment 2 Jian Zhang 2021-09-08 13:10:26 UTC
kubectl exec catalog-operator-7f656b6d67-mcd82  -n olm -- olm --version                                                                                                                                                             
OLM version: 0.17.0
git commit: 5eb1fa6ad6ecfbf1263a145e54e5bd181a078097
Install operator into a namespace (e.g 3scale from OperatorHub. This will install CRDs onto the cluster
kubectl get csv -n olm           
NAME                  DISPLAY          VERSION   REPLACES              PHASE
etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded
packageserver         Package Server   0.17.0                          Succeeded
Run some script that constantly updates the CRDs of the installed operator to mimic some event updating the CRD
 while true; do        
    kubectl patch crd etcdclusters.etcd.database.coreos.com  --type=json -p='[{"op" : "add", "path" : "/metadata/labels/test", "value": "test"}]'
    kubectl 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
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
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

Install the same operator into a different namespace
kubectl get csv --all-namespaces 
NAMESPACE   NAME                  DISPLAY          VERSION   REPLACES              PHASE
etcd-1      etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded
etcd        etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded
olm         etcdoperator.v0.9.4   etcd             0.9.4     etcdoperator.v0.9.2   Succeeded
olm         packageserver         Package Server   0.17.0                          Succeeded
Inspect for failed install plan
kubectl get ip --all-namespaces                            
NAMESPACE   NAME            CSV                   APPROVAL    APPROVED
etcd-1      install-shkw9   etcdoperator.v0.9.4   Automatic   true
etcd        install-mbkfl   etcdoperator.v0.9.4   Automatic   true
olm         install-lkfh5   etcdoperator.v0.9.4   Automatic   true

Comment 4 Bruno Andrade 2021-09-14 18:01:50 UTC
Marking as VERIFIED considering comment #2.

Comment 7 errata-xmlrpc 2021-09-29 14:10:09 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.7.32 bug fix 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:3636