[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 12 of 14 v4] libxl: set frontend status to 6 on domain destroy



On Wed, 2011-12-14 at 12:12 +0000, Roger Pau Monnà wrote:
> 2011/12/14 Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>:
> >> Yes, if I delete the frontend from xenstore, the devices are detached.
> >> Anyway, doing it one way or another (deletion or setting state to 6)
> >> doesn't really make a difference, you still have to wait for the
> >> backend to be disconnected (detached) before executing hotplug
> >> scripts.
> >
> > So device destruction could be achieved by simply deleting the backend
> > directory.  But, we would need some other way to detect when the
> > backend has actually closed the device so that we can run the script.
> 
> Device detach, will in turn allows destruction, can be achieved in two ways:
> 
>  * Set frontend status to 6.
>  * Remove frontend entries.
> 
> There is no need to change backend entries to force detach a device.

The correct method for forcibly destroying a device is to remove the
backend directory.

The correct method to perform a graceful remove is to set the backend
state to "5" and wait for it to coordinate with the guest to reach state
"6". However this is not a forced operation and may not complete in a
timely manner or indeed at all.

Some backends also support an "online" node which, if left set to 1 when
setting the backend state to 5" for a graceful shutdown, causes the
backend to detach but remain active (as opposed to self destructing) in
the expectation of a frontend reconnecting again later -- this is used
for example when kexecing a PV domain.

In no case should the toolstack be messing with the frontend state,
although obviously in the destroy case it is at liberty shortly
afterwards to also nuke the frontend directory.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.