[openstack-dev] [Cinder] [nova] Work flow for detaching a volume
john.griffith8 at gmail.com
Fri Feb 26 20:19:01 UTC 2016
On Fri, Feb 26, 2016 at 12:47 PM, Sean McGinnis <sean.mcginnis at gmx.com>
> On Fri, Feb 26, 2016 at 06:11:15PM +0000, Srinivas Sakhamuri wrote:
> > I want to confirm the correct work flow for detaching a volume, Both nova
> > and cinder (unpublished, available through cinder.volumes.detach)
> > detach volume API. Only nova seems to have correct work flow in terms of
> > detaching a volume i.e.
> > 1) detaches the volume from the VM (libvirt.volume_detach)
> > 2) Informs Cinder to do Cinder-side detach
> > 3) delete BlockDeviceMapping from Nova DB
> > On the other hand cinder just modifies cinder DB entries and let's the
> > driver handle the detaching the volume. No API call to nova to let it
> > about the volume detaching.
> > - Does that mean nova is the only work flow to use to correctly detach a
> > volume from instance?
> > - And cinder detach API serves only to cleanup internal state in the DB
> > cinder driver?
> I guess it depends on what you are trying to accomplish. If a volume is
> being used by nova, then the nova APIs are the correct ones to use to
> have it fully detached from the host and cleaned up.
> Internally, Nova calls the Cinder APIs to perform the storage
> If you are just looking to perform storage management, for example
> with bare metal and not using Nova, then you would call the
> Cinder APIs.
> So to answer your first question of whether the nova API is the correct
> way to detach a volume from an instance - yes.
> > TIA
> > Srini
> > OpenStack Development Mailing List (not for usage questions)
> > Unsubscribe:
> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
Maybe this will help https://review.openstack.org/#/c/285471/
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev