Bug 1669116

Summary: [RFE] delete importer pod if CDI PVC is terminating
Product: Container Native Virtualization (CNV) Reporter: Vatsal Parekh <vparekh>
Component: StorageAssignee: Adam Litke <alitke>
Status: CLOSED DUPLICATE QA Contact: shiyang.wang <shiywang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.4CC: cnv-qe-bugs, jparrill, ncredi
Target Milestone: ---   
Target Release: 2.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: 2019-02-11 15:21:14 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 Vatsal Parekh 2019-01-24 11:28:17 UTC
Description of problem:
Currently if a PVC is associated with CDI and its importer pod is still in running, importer controller won't delete the pod, and if the pod is stuck the pvc won't be deleted till it ends. This is not a bug because we can simply delete the pod and pvc will terminate.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Juan Manuel Parrilla Madrid 2019-02-08 10:41:35 UTC
I've been going through the same issue, here some traces:


Journalctl (many times and in a loop)
```
feb 08 05:38:58 unified-demo01-master0.cnv-comm.10.8.120.107.nip.io atomic-openshift-node[49975]: E0208 05:38:58.776835   49975 desired_state_of_world_populator.go:298] Error processing volume "cdi-data-vol" for pod "importer-lel-lol-trflj_myvms(b5e61ce9-2b85-11e9-9c8b-001a4a2314e4)": error processing PVC "myvms"/"lel-lol": can't start pod because PVC myvms/lel-lol is being deleted
feb 08 05:38:58 unified-demo01-master0.cnv-comm.10.8.120.107.nip.io atomic-openshift-node[49975]: E0208 05:38:58.979223   49975 desired_state_of_world_populator.go:298] Error processing volume "cdi-data-vol" for pod "importer-aaaa-cirr-2ctx4_myvms(8f94589a-2b85-11e9-9c8b-001a4a2314e4)": error processing PVC "myvms"/"aaaa-cirr": can't start pod because PVC myvms/aaaa-cirr is being deleted
feb 08 05:38:59 unified-demo01-master0.cnv-comm.10.8.120.107.nip.io atomic-openshift-node[49975]: E0208 05:38:59.376671   49975 desired_state_of_world_populator.go:298] Error processing volume "cdi-data-vol" for pod "importer-rootdisk-cirr-6rbrx_myvms(c123da1a-2b85-11e9-9c8b-001a4a2314e4)": error processing PVC "myvms"/"rootdisk-cirr": can't start pod because PVC myvms/rootdisk-cirr is being deleted
feb 08 05:38:59 unified-demo01-master0.cnv-comm.10.8.120.107.nip.io atomic-openshift-node[49975]: E0208 05:38:59.776763   49975 desired_state_of_world_populator.go:298] Error processing volume "cdi-data-vol" for pod "importer-aaaa-cirr-2ctx4_myvms(8f94589a-2b85-11e9-9c8b-001a4a2314e4)": error processing PVC "myvms"/"aaaa-cirr": can't start pod because PVC myvms/aaaa-cirr is being deleted
feb 08 05:38:59 unified-demo01-master0.cnv-comm.10.8.120.107.nip.io atomic-openshift-node[49975]: E0208 05:38:59.979083   49975 desired_state_of_world_populator.go:298] Error processing volume "cdi-data-vol" for pod "importer-rootdisk-cirr-6rbrx_myvms(c123da1a-2b85-11e9-9c8b-001a4a2314e4)": error processing PVC "myvms"/"rootdisk-cirr": can't start pod because PVC myvms/rootdisk-cirr is being deleted
feb 08 05:39:00 unified-demo01-master0.cnv-comm.10.8.120.107.nip.io atomic-openshift-node[49975]: E0208 05:39:00.176466   49975 desired_state_of_world_populator.go:298] Error processing volume "cdi-data-vol" for pod "importer-lel-lol-trflj_myvms(b5e61ce9-2b85-11e9-9c8b-001a4a2314e4)": error processing PVC "myvms"/"lel-lol": can't start pod because PVC myvms/lel-lol is being deleted
``` 

Meanwhile the PVC and PV stays there:
```
Every 2,0s: oc get pvc && echo && echo && echo && oc get pv                                                                        Fri Feb  8 05:40:49 2019

NAME            STATUS        VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE
aaaa-cirr	Terminating   pvc-8f909636-2b85-11e9-9c8b-001a4a2314e4   2Gi        RWO            glusterfs-storage   1h
lel-lol         Terminating   pvc-b5d6476c-2b85-11e9-9c8b-001a4a2314e4   2Gi        RWO            glusterfs-storage   59m
rootdisk-cirr   Terminating   pvc-c11fec9e-2b85-11e9-9c8b-001a4a2314e4   10Gi       RWO            glusterfs-storage   59m



NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS    CLAIM                 STORAGECLASS        REASON    AGE
pvc-8f909636-2b85-11e9-9c8b-001a4a2314e4   2Gi        RWO            Delete           Bound     myvms/aaaa-cirr       glusterfs-storage             59m
pvc-b5d6476c-2b85-11e9-9c8b-001a4a2314e4   2Gi        RWO            Delete           Bound     myvms/lel-lol         glusterfs-storage             59m
pvc-c11fec9e-2b85-11e9-9c8b-001a4a2314e4   10Gi       RWO            Delete           Bound     myvms/rootdisk-cirr   glusterfs-storage             58m
```

This is happening to me when I add a blank disk to the created VM.

Comment 2 Adam Litke 2019-02-11 15:21:14 UTC

*** This bug has been marked as a duplicate of bug 1673683 ***