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

Re: [Xen-devel] FW: Cancelling asynchronous operations in libxl

On Wed, 2013-10-23 at 13:23 -0400, Konrad Rzeszutek Wilk wrote:
> On Tue, Oct 15, 2013 at 04:08:31PM +0000, Simon Beaumont wrote:
> > We're in the process of porting xenopsd[1] to libxl, rather than
> driving libxc manually.
> > 
> > Using our libxc-based backend, we are able to cancel operations. For
> operations that are using XenStore watches we wrap these in a
> cancellable_watch[2], and for operations that make use of a subprocess
> we send SIGKILL when we wish to cancel the associated task. We would
> then instrument any necessary cleanup by hand on a best-effort basis.
> > 
> > With the move to libxl, a lot of this control will be abstracted
> away and it is unclear how best to allow long-running tasks to be
> cancelled. It seems most of these operations could be executed
> asynchronously but we wonder if it is possible to cancel them, or how
> we could add cancellation functionality to these operations?
> Are there specific operations that you are focusing on to cancel?

Yes, this would be good to know. Ian J would know better than I but AIUI
there is currently no generic support for cancelling an asynchronous op
in libxl. I'm sure we could find a way to add this, for example as an
abort after the current "step" succeeds/times out/fails.

> Or is this mostly of 'the guest is doing something and does not seem
> to have a vnc/console, lets kill it' ?

For killing libxl_domain_destroy should be fine to call even if there is
an async op pending on that domain, the async op will naturally fail,
it'll probably log a lot but should do so gracefully. If there are cases
which do not we should fix them, since they would represent a bug
irrespective of any killing of the domain from under the op's feet.


Xen-devel mailing list



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