Bug 1660131

Summary: openstack project purge failed to delete a volume although it was already not in use
Product: Red Hat OpenStack Reporter: Udi Kalifon <ukalifon>
Component: python-openstackclientAssignee: RHOS Maint <rhos-maint>
Status: CLOSED INSUFFICIENT_DATA QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: apevec, aschultz, beth.white, hbrock, jbuchta, jpichon, jslagle, kecarter, lhh, mburns
Target Milestone: ---Keywords: ZStream
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: 2019-11-21 21:55:45 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 Udi Kalifon 2018-12-17 15:09:35 UTC
Description of problem:
I ran "openstack project purge --project master" and got:

Deleting server : c4c98a24-781b-4fe4-bd27-5d4b4fa7a536
Deleting image : 16a0049f-200b-424b-ab18-431508d9abf0
Deleting volume : 59529490-ee07-46aa-87d3-b7e96d00af03
Failed to delete volume with ID '59529490-ee07-46aa-87d3-b7e96d00af03': Invalid volume: Volume  must not be migrating, attached, belong to a group, have snapshots or be disassociated from snapshots after volume transfer. (HTTP 400) (Request-ID: req-a3a72d12-373c-4a0e-8d5c-e8b345eaabf7)
1 of 1 volumes failed to delete.
Deleting project: a0e40562faa84db4aa71a7a82986080b

The volume was supposed to be deletable, as the instance it was attached to was already deleted by the purge. After the purge I manually deleted the volume and had no problem:

openstack volume delete 59529490-ee07-46aa-87d3-b7e96d00af03


Version-Release number of selected component (if applicable):
python2-openstackclient-3.14.3-1.el7ost.noarch


How reproducible:
100%


Steps to Reproduce:
1. Deploy an overcloud and populate it with a project, networks, instances and volumes
2. Purge the project


Actual results:
The volume is still not deleted

Comment 4 Alex Schultz 2019-11-21 21:55:45 UTC
I do not believe the 'openstack project purge' command is officially supported.  Additionally we would need logs to further assist.