[openstack-dev] [cinder] Why not allow deleting volume from a CG ?

Nilesh P Bhosale nilesh.bhosale at in.ibm.com
Fri Feb 6 10:21:32 UTC 2015


Hi All,

I see the following error, while deleting a volume from a consistency 
group:
$ [admin]cinder delete vol1
Delete for volume vol1 failed: Bad Request (HTTP 400) (Request-ID: 
req-7c958443-edb2-434f-82a2-4254ab357e99)
ERROR: Unable to delete any of specified volumes.

And when I tried to debug this, found the following at: 
https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L310:
        if volume['consistencygroup_id'] is not None:
            msg = _("Volume cannot be deleted while in a consistency 
group.")
            LOG.info(_LI('Unable to delete volume: %s, '
                         'volume is currently part of a '
                         'consistency group.'), volume['id'])
            raise exception.InvalidVolume(reason=msg)

I understand this is as per design, but curious to understand logic behind 
this.
Why not allow deletion of volumes form the CG? at least when there are no 
dependent snapshots.
With the current implementation, only way to delete the volume is to 
delete the complete CG, deleting all the volumes in that, which I feel is 
not right.

Am I missing anything? Please help understand.

Thanks,
Nilesh Bhosale

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150206/dc5006c1/attachment.html>


More information about the OpenStack-dev mailing list