[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


  • To: "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Edwin Torok <edvin.torok@xxxxxxxxxx>
  • Date: Wed, 13 Jan 2021 17:42:48 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=snu7hOmGZhJu/H6Kfuuq7DHlzm86DAvJ42iZsLkJEYc=; b=fiovzBVFTNaLsGXRo1zWF02z57F1WVZHsHk7cSRVpieEg9BMj7Fa6sG3vf77iH/2jcQI3D8AoX2zNG4J1SZnXNbMeIqKBHXBtcHkW/QQq3Si4NwBnl4tIVfkJNPukmOJLy0lMmqrXrl1SwSSOEf0/aCzxTpCTrk2PUX/rWgttjGIzPJIea6UYAo2ZLeHtdpkh3MVD8fwrSGk3cMlp6dZwbAsBpVYaAZHOFvPyaO5G9QPjmNIVYTG4y19f80CxH2HAvJHMuapdtR8GMWwQ+etupEyou2LvtCtyldCqVbnUKy3yMW8z5lfCpm8aokOlHDEu1cCGIm9s5wsIvrwzaIlBA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=To+tkVSV2dmjzgEgUw3b9qQ0HPCaDXZnmoCAP540Cc05sg1o85IXLuZ9yiJMWOGzQP/N0ID/ybw8UCidpUEqU98mTumxhVy+jL0VFadZIn9L/ip6gme9p9XdRWYClZDc++4apcqEEwIxoDjNDqIhEkN4o6ku4M/v+Bp439i10HMM7PDjSWIXjID+m14hKUp/LMFnyoDh4r5azyxiKTAABwkV1DxSSO/TcYNfibFJsSO5Y655m2kReJy/nxTX04/6h75aR+MiOm/FKjki7aZxCtkU1fyvZw+QwQqcIiKz9sCZItt8/tPgD+j4PLGh4shfRIGTSRcrCFXqRF/GdtXf1A==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, "iwj@xxxxxxxxxxxxxx" <iwj@xxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "jgrall@xxxxxxxxxx" <jgrall@xxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Delivery-date: Wed, 13 Jan 2021 17:42:57 +0000
  • Ironport-sdr: XeWkoFYBNjHN4DLw0fls/bcNdF00zjVo+1zkt+bPDVa9WM6g+GChFCNOt+uPP0+8m4rjV57Kh1 plJHqTOLGtVVko4ag4VcB6dnQOZraKnbKYbruYH/8ckI/VH+Kdk5t5XO2ILsi1hCD1zQlv4Z7I nqfIP143q8AxqMTa7gTWxdGILXXS7lFx17NNnsmxUhGGuVVyVKhojFs5CXI7uJLnWr01bGlUhm BHbtmumqsuhqQpE4Q7JEeoUAbhUZhUiHucefmNdVAqVZbWm10NhSRc65yvS2MhVdgzqf5AMFRZ /aA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHW5DasU1BxCsIJ+UqM32f3+7Ll9aoaq8UAgAsfvYCAABMTgA==
  • Thread-topic: [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

 


Rackspace

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