The default behaviour of our volume driver is to call use the
DELETE API of InfiniBox in the implementation of Cinder
If everything works correctly, this shouldn't be a problem for Cinder, since it controls the snapshots and volume mappings and will not allow even call our API - it will validate beforehand that the volume is not being used.
Cinder also exposed a method to the client named force-delete which bypasses all the validations; problem is that it doesn't pass the force to the volume driver, and we cannot tell if the user requested a force-delete and expects us to do whatever it takes to delete the volume (such as removing LUN mappings, deleting the snapshot tree, etc).
There was two ways customers can handle this situation:
- Delete the volume mappings and snapshots from InfiniBox GUI/CLI and then run Cinder's force-delete again, and it should work this time
infinidat_purge_volume_on_deletion = Truein the backend configuration and then use the force-delete command; when this parameter is set to true, we will use the purge method in infinipy, which will recursively purge all the volume's children, remove the volume mappings and then delete it (assuming the user has credentials to do all that).
There's no option to set this parameter with infini-openstack (our command-line tool); this needs to be done manually by modifying the cinder configuration file (the default location is /etc/cinder/cinder.conf). Here's a sample diff when applying this change:
It doesn't matter if the value is True or true