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

Re: [Xen-devel] [PATCH 0/5] Towards a restartable oxenstored



On 07/04/17 16:09, Wei Liu wrote:
> On Fri, Apr 07, 2017 at 02:27:17PM +0100, Jonathan Davies wrote:
>> In order to make oxenstored restartable, we need to save internal state 
>> to a file on exit and restore from this file on startup.
>>
>> Much of the infrastructure for making oxenstored restartable already 
>> existed, but a handful of bugs prevented it from working.
>>
>> After these patches I can do the following:
>>
>>     # xenstore-write foo bar
>>     # xenstore-read foo
>>     bar
>>     # xenstore-ls -f -p | sort > contents.before
>>     # killall oxenstored
>>     # ./oxenstored --restart
>>     # xenstore-ls -f -p | sort > contents.after
>>     # diff contents.before contents.after
>>     # xenstore-read foo
>>     bar
>>
>> ... and I can do similar kinds of activity in a guest across the 
>> restart.
>>
>> Note that clients of local socket connections will get EPIPE or similar 
>> when oxenstored terminates. Hence these clients need to handle this
>> gracefully, e.g. by attempting to reconnect, if they wish to tolerate 
>> xenstored restarts.
>>
>> With these patches, the state saved on exit contains information about 
>> inter-domain connections and active watches, and the contents of the
>> store. Some internal state is not currently preserved over a restart:
>>   1. quota usage info
>>   2. partially-read and already-queued packets from rings
>>   3. recent transaction history
>>
>> Items 1 and 2 are probably needed for this to be considered fully 
>> functional, so fixes for them should follow. But the bugfixes in this 
>> series already represent a worthwhile improvement.
>>
>> Jonathan Davies (5):
>>   oxenstored: initialise logging earlier
>>   oxenstored: avoid leading slash in paths in saved store state
>>   oxenstored: save remote evtchn port, not local port
>>   oxenstored: improve event-channel binding logging
>>   oxenstored: make --restart option best-effort
>>
> 
> I think this series can be considered for 4.9, given they are small
> changes.
> 
> The code looks good as far as I'm concerned. I will wait for OCaml
> experts to review them.
> 
>>  tools/ocaml/xenstored/domain.ml    |  4 ++--
>>  tools/ocaml/xenstored/store.ml     |  8 +++++++-
>>  tools/ocaml/xenstored/xenstored.ml | 10 ++++++----
>>  3 files changed, 15 insertions(+), 7 deletions(-)

Is the data format of the saved state documented somewhere? I'd
appreciate any pointer or (in case there is no such doc) a followup
patch to add the documentation.

This would help later in case C-xenstored learns restartability, too,
and someone would like to switch the xenstored type on a running
system.


Juergen

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

 


Rackspace

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