Bug 1909136 - Volume and volumesnapshot did not be deleted in the back end after OCP cluster removal
Summary: Volume and volumesnapshot did not be deleted in the back end after OCP cluste...
Status: CLOSED DUPLICATE of bug 1917710
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.7
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: ShiftStack Bugwatcher
QA Contact: Wei Duan
Depends On:
TreeView+ depends on / blocked
Reported: 2020-12-18 12:34 UTC by Wei Duan
Modified: 2021-12-15 16:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-12-15 16:40:56 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4858 0 None closed Bug 1909136: destroy volumes and snapshots created by Cinder CSI driver 2021-05-27 15:25:19 UTC
Github openshift installer pull 4962 0 None open Bug 1909136: OpenStack: delete volume snapshots 2021-05-27 15:25:26 UTC
Github openshift openstack-cinder-csi-driver-operator pull 33 0 None closed Bug 1909136: Pass cluster ID to CSI driver 2021-05-27 15:25:24 UTC

Description Wei Duan 2020-12-18 12:34:47 UTC
Description of problem:
Volume and volumesnapshot did not be deleted in the back end after OCP cluster removal

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install OSP cluster and cinder csi driver is installed.
2. Create pvc (reclaimPolicy: Delete in storageclass)
3. Create volumesnapshot (deletionPolicy: Delete in volumesnapshotclass)
4. Delete cluster
5. Check the volume and volumesnapshot in the back end

Actual results:
volume and volumesnapshot did not removed

Expected results:
volume and volumesnapshot should be removed after OCP cluster removal

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

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

Additional info:

Comment 3 Martin André 2021-03-25 14:17:53 UTC
Cinder CSI does not offer the ability to set additional tags the resources it creates. It does add the "cinder.csi.openstack.org/cluster" property however [1], which I assume is to match the volume with a cluster ID, but in practice it is set to 'kubernetes':

$ openstack volume show pvc-96cfac38-fa62-4a51-8f2d-febf96920b2a -f value -c properties
{'cinder.csi.openstack.org/cluster': 'kubernetes'}

The 'kubernetes' value apparently comes from [2].

Once we fix the cluster name for CSI driver, we'll have to adapt the installer's destroy module to look for volumes with the `cinder.csi.openstack.org/cluster=<cluster_id>` property.

[1] https://github.com/openshift/cloud-provider-openstack/blob/ef0206889cb7c39f04d215e8cbb6c69616e59ea4/pkg/csi/cinder/controllerserver.go#L104
[2] https://github.com/openshift/openstack-cinder-csi-driver-operator/blob/729e71f/assets/controller.yaml#L49

Comment 9 Pierre Prinetti 2021-05-27 15:31:00 UTC
*** Bug 1917710 has been marked as a duplicate of this bug. ***

Comment 13 ShiftStack Bugwatcher 2021-11-25 16:11:12 UTC
Removing the Triaged keyword because:
* the target release value is missing

* the QE automation assessment (flag qe_test_coverage) is missing

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