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

Re: [Xen-devel] [PATCH v5 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest



On 19/04/13 11:50, Ian Campbell wrote:
On Fri, 2013-04-19 at 11:18 +0100, George Dunlap wrote:

We could add an option that says "attempt to do the remove even if
you
don't see the device in xenstore" I suppose.  But I'm not really sure
how to document that in a useful way without basically describing the
internal mechanics of the command.

There's nothing we can really do about usb-list though.
You could write it to xenstore before attempting the qmp commands. That
just relies on the qmp remove failing gracefully for devices which
aren't actually attached.

qmp remove will just return an error if you attempt to remove a device id it doesn't know about. I suppose that could work. It's also a bit more robust against, say, the xenstore add failing for whatever reason.

You might also be able to come up with some complicated, prepare, do it,
commit in xenstore like approach -- but that's probably a) difficult (if
not impossibly due to races) and b) unnecessary.

Well if the failure mode is the process executing the libxl function being killed at a random point, I don't think we can do a transaction thing -- it would have to coordinate between qmp and xenstore. AFAIK qmp doesn't have any transaction support, so who is going to do the cleanup? The process that was just killed? If it could, it could just finish whatever it was doing anyway.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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