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

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



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

 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(-)

-- 
2.7.4


_______________________________________________
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®.