Bug 1826285

Summary: [aws-ebs-csi-driver-operator] Operator tries to delete operand when CR isn't found
Product: OpenShift Container Platform Reporter: Fabio Bertinatto <fbertina>
Component: StorageAssignee: Fabio Bertinatto <fbertina>
Status: CLOSED ERRATA QA Contact: Qin Ping <piqin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:29:34 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 Fabio Bertinatto 2020-04-21 11:25:46 UTC
When the operator starts for the first time, for example, the CR might now exist yet. In that that case, we shouldn't try to delete the CSI driver.

We should only delete the operand if the CR has a deletion timestamp in it.

Comment 3 Qin Ping 2020-05-09 11:56:35 UTC
Verified with:
# oc get csv -n openshift-aws-ebs-csi-driver-operator
NAME                                 DISPLAY                VERSION   REPLACES
 PHASE
aws-ebs-csi-driver-operator.v4.5.0   AWS EBS CSI Operator   4.5.0             
 Succeeded

ose-aws-ebs-csi-driver-operator-bundle-container-v4.5-6

ose-aws-ebs-csi-driver-operator-container-v4.5-5

# oc describe  awsebsdriver cluster|grep "Deletion Timestamp"
  Deletion Timestamp:             2020-05-09T11:52:36Z

# oc get pod -n openshift-aws-ebs-csi-driver-operator
NAME                                          READY   STATUS    RESTARTS   AGE
aws-ebs-csi-driver-operator-f84975c47-f7p8d   1/1     Running   0          57s


# oc get pod -n openshift-aws-ebs-csi-driver
NAME                                             READY   STATUS    RESTARTS   AGE
aws-ebs-csi-driver-controller-5467c64898-gswbw   5/5     Running   0          7m6s
aws-ebs-csi-driver-node-8cdpk                    3/3     Running   0          7m6s
aws-ebs-csi-driver-node-fjm75                    3/3     Running   0          7m6s
aws-ebs-csi-driver-node-wx7xd                    3/3     Running   0          7m6s

# oc get awsebsdriver
No resources found in default namespace.

Comment 4 errata-xmlrpc 2020-07-13 17:29: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, 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:2409