Bug 1867167 - Could not delete a problematic volumesnapshot instance.
Summary: Could not delete a problematic volumesnapshot instance.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Christian Huffman
QA Contact: Wei Duan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-07 14:51 UTC by Wei Duan
Modified: 2020-10-27 16:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:26:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift csi-external-snapshotter pull 28 0 None closed Bug 1876810: Rebase v3.0.0 2020-11-03 16:49:53 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:26:53 UTC

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


Note You need to log in before you can comment on or make changes to this bug.