Bug 1654716

Summary: [openstack] Uninstall playbook doesn't remove the pvcs created in the environment
Product: OpenShift Container Platform Reporter: Eduardo Minguez <eminguez>
Component: InstallerAssignee: Scott Dodson <sdodson>
Installer sub component: openshift-ansible QA Contact: Johnny Liu <jialiu>
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified    
Version: 3.11.0   
Target Milestone: ---   
Target Release: ---   
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: 2018-11-29 15:29:43 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 Eduardo Minguez 2018-11-29 13:51:44 UTC
Description of problem:

OCP deployed on OSP using the https://github.com/openshift/openshift-ansible/blob/master/playbooks/openstack/ playbooks. During the cluster lifetime, some users created pvcs, hence cinder volumes (kubernetes-pvc-XXX)

When using the openstack uninstall playbook (https://github.com/openshift/openshift-ansible/blob/master/playbooks/openstack/openshift-cluster/uninstall.yml) those cinder volumes are not deleted.

Version-Release number of the following components:
OCP 3.11.43

How reproducible:
Install a cluster with openstack-openshift playbooks, create some sample apps with persistent storage, then uninstall the cluster.

Steps to Reproduce:
1.
2.
3.

Actual results:
Cinder volumes corresponding to pvcs are not deleted.

Expected results:
Having a flag/variable such as 'keep_pvcs=true/false' and then in the uninstall process run something as:
'for n in $(oc get namespaces -o name | cut -d'/' -f2); do oc delete --all pvc -n ${n}; done' (but ansibilized here https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_openstack/tasks/unprovision.yml)

Additional info:

Comment 1 Scott Dodson 2018-11-29 15:29:43 UTC
The installer only manages items it directly creates. We cannot go down the rabbit hole of cleaning up all resources that may have been created by the cluster at this time.