<font size=2 face="sans-serif">Hi All,</font>
<br>
<br><font size=2 face="sans-serif">I see the following error, while deleting
a volume from a consistency group:</font>
<br><font size=2 face="sans-serif">$ [admin]cinder delete vol1</font>
<br><font size=2 face="sans-serif">Delete for volume vol1 failed: Bad Request
(HTTP 400) (Request-ID: req-7c958443-edb2-434f-82a2-4254ab357e99)</font>
<br><font size=2 face="sans-serif">ERROR: Unable to delete any of specified
volumes.</font>
<br>
<br><font size=2 face="sans-serif">And when I tried to debug this, found
the following at: </font><a href=https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L310><font size=2 color=blue face="sans-serif">https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L310</font></a><font size=2 face="sans-serif">:</font>
<br><font size=2 color=#800000 face="sans-serif">       
if volume['consistencygroup_id'] is not None:</font>
<br><font size=2 color=#800000 face="sans-serif">       
    msg = _("Volume cannot be deleted while in a consistency
group.")</font>
<br><font size=2 color=#800000 face="sans-serif">       
    LOG.info(_LI('Unable to delete volume: %s, '</font>
<br><font size=2 color=#800000 face="sans-serif">       
                 'volume is
currently part of a '</font>
<br><font size=2 color=#800000 face="sans-serif">       
                 'consistency
group.'), volume['id'])</font>
<br><font size=2 color=#800000 face="sans-serif">       
    raise exception.InvalidVolume(reason=msg)</font>
<br>
<br><font size=2 face="sans-serif">I understand this is as per design,
but curious to understand logic behind this.</font>
<br><font size=2 face="sans-serif">Why not allow deletion of volumes form
the CG? at least when there are no dependent snapshots.</font>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">Am I missing anything? Please help understand.</font>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br><font size=2 face="sans-serif">Nilesh Bhosale</font>
<br>
<br>