[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v10 06/25] tools/xenstore: add live update command to xenstore-control
On Wed, 2021-01-13 at 17:34 +0100, Jürgen Groß wrote: > On 06.01.21 15:42, Edwin Torok wrote: > > [...] > > > > I'd prefer it if there was a more asynchronous protocol available > > for > > live-update: > > * the live-update on its own queues up the live update request and > > returns a generation ID. xenstored retries on its own during each > > of > > its main loop iterations whether the conditions for live-update are > > now > > met > > * when a generation ID is specified with the live-update command it > > acts as a query to return the status. A query for generation ID < > > current ID return success, and for generation ID = current ID it > > returns either BUSY, or a specific error if known (e.g. timeout > > reached > > and list of domains preventing live update) > > * the generation ID gets incremented every time a live update > > succeeds > > > > This would eliminiate the need for a client-side timeout, since > > each of > > these commands would be non-blocking. > > It'd also avoid the busy-poll flood. > > > > Obviously any change here has to be backwards compatible with the > > already deployed xenstored and oxenstored which doesn't know about > > generation IDs, but you can tell them apart based on the reply: if > > you > > get back OK/BUSY/some error it is the old version, if you get back > > a > > generation ID it is the new version. > > > > I ran out of time to implement this before the embargo was up, > > should I > > go ahead with prototyping a patch for this now, or do you see an > > alternative way to make the live-update command more robust? > > I think this can be made much easier: > > The live-update should be handled completely in the daemon, so > returning only with success or failure. Returning BUSY wouldn't > occur this way, but either "OK" (after the successful LU) or a > failure reason (e.g. list of domains blocking) would be > returned. > > I'll have a try with this approach. > > In oxenstored each request wants an immediate reply, so delaying the reply to after the live-update is not trivial. Should be possible to do though (e.g. mark the socket such that no further xenstore protocol is processed on it, and "put back" the live update request, to be replied by the new xenstored after the live update completes, which would clear the 'do not process this socket' flag), I'll be curious to see what your approach will look like. Best regards, --Edwin
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |