<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 26, 2016 at 12:47 PM, Sean McGinnis <span dir="ltr"><<a href="mailto:sean.mcginnis@gmx.com" target="_blank">sean.mcginnis@gmx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Fri, Feb 26, 2016 at 06:11:15PM +0000, Srinivas Sakhamuri wrote:<br>
> I want to confirm the correct work flow for detaching a volume, Both nova<br>
> and cinder (unpublished, available through cinder.volumes.detach) provides<br>
> detach volume API. Only nova seems to have correct work flow in terms of<br>
> detaching a volume i.e.<br>
>     1) detaches the volume from the VM (libvirt.volume_detach)<br>
>     2) Informs Cinder to do Cinder-side detach<br>
>     3) delete BlockDeviceMapping from Nova DB<br>
><br>
> On the other hand cinder just modifies cinder DB entries and let's the<br>
> driver handle the detaching the volume. No API call to nova to let it know<br>
> about the volume detaching.<br>
><br>
> - Does that mean nova is the only work flow to use to correctly detach a<br>
> volume from instance?<br>
> - And cinder detach API serves only to cleanup internal state in the DB and<br>
> cinder driver?<br>
<br>
</span>I guess it depends on what you are trying to accomplish. If a volume is<br>
being used by nova, then the nova APIs are the correct ones to use to<br>
have it fully detached from the host and cleaned up.<br>
<br>
Internally, Nova calls the Cinder APIs to perform the storage<br>
management.<br>
<br>
If you are just looking to perform storage management, for example<br>
with bare metal and not using Nova, then you would call the<br>
Cinder APIs.<br>
<br>
So to answer your first question of whether the nova API is the correct<br>
way to detach a volume from an instance - yes.<br>
<br>
Sean<br>
<br>
><br>
> TIA<br>
> Srini<br>
<br>
> __________________________________________________________________________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:monospace,monospace">​Maybe this will help <a href="https://review.openstack.org/#/c/285471/">https://review.openstack.org/#/c/285471/</a></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Additionally I've been trying to point out lately that a Volume should be just a "thing" or resource and it's up to consumers of volumes to manage connections (attach/detach) appropriately.​</div><br></div></div>