Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1867167

Summary: Could not delete a problematic volumesnapshot instance.
Product: OpenShift Container Platform Reporter: Wei Duan <wduan>
Component: StorageAssignee: Christian Huffman <chuffman>
Storage sub component: Kubernetes External Components QA Contact: Wei Duan <wduan>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, jsafrane
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:26: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 Wei Duan 2020-08-07 14:51:15 UTC
Description of problem:
After creating a volumesnapshot instance without finding the PersistentVolumeSource, it could not be deleted anymore.

Version-Release number of selected component (if applicable):
[wduan@MINT snapshot]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-06-131904   True        False         14h     Cluster version is 4.6.0-0.nightly-2020-08-06-131904

How reproducible:
2/2

Steps to Reproduce:
0. aws-ebs-csi-driver is installed by default in 4.6 
1. Create pvc with in-tree sc gp2 
$ oc get pvc
NAME       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
mypvc-1    Bound    pvc-40497255-b302-45e3-953a-aff57acba5bc   1Gi        RWO            gp2            8m55s

2. Create volumesnapshotclass 
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshotClass  
metadata:
  name: csi-aws-ebs-snapclass
  annotations:
    snapshot.storage.kubernetes.io/is-default-class: "true"
driver: ebs.csi.aws.com
deletionPolicy: Delete

3. Create volumesnapshot with snapshotclass, instance is in ReadToUse=false
apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshot
metadata:
  name: mysnapshot-1
spec:
  volumeSnapshotClassName: csi-aws-ebs-snapclass
  source:
    persistentVolumeClaimName: mypvc-1

$ oc get volumesnapshot
NAME           READYTOUSE   SOURCEPVC   SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS           SNAPSHOTCONTENT   CREATIONTIME   AGE
mysnapshot-1   false        mypvc-1                                           csi-aws-ebs-snapclass                                    8m41s

4. Detele the volumesnapshot instance
$ oc delete volumesnapshot mysnapshot-1
volumesnapshot.snapshot.storage.k8s.io "mysnapshot-1" deleted

^C
[wduan@MINT snapshot]$ oc get volumesnapshot
NAME           READYTOUSE   SOURCEPVC   SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS           SNAPSHOTCONTENT   CREATIONTIME   AGE
mysnapshot-1   false        mypvc-1                                           csi-aws-ebs-snapclass                                    91m


Actual results:
This volumesnapshot instance could not be deleted.

Expected results:
This volumesnapshot instance should be deleted.

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

StorageClass Dump (if StorageClass used by PV/PVC):

Additional info:

Comment 2 Christian Huffman 2020-08-12 19:19:02 UTC
I've submitted a patch upstream [1] to address this issue.

[1] https://github.com/kubernetes-csi/external-snapshotter/pull/354

Comment 3 Christian Huffman 2020-08-17 14:18:36 UTC
After discussing this upstream, it appears [1] addresses this issue. I'll backport this once it's merged.

[1] https://github.com/kubernetes-csi/external-snapshotter/pull/360

Comment 7 Wei Duan 2020-09-30 10:33:55 UTC
Just remark the test result in 4.6.

Verified with the rebased image in 4.6 nightly (4.6.0-0.nightly-2020-09-22-213802)

Comment 11 Wei Duan 2020-10-09 01:48:01 UTC
Changed status to "VERIFIED"

Comment 13 errata-xmlrpc 2020-10-27 16:26: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.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