Skip to content

Commit

Permalink
tools/xenstore: add live update command to xenstore-control
Browse files Browse the repository at this point in the history
Add the "live-update" command to xenstore-control enabling updating
xenstored to a new version in a running Xen system.

With -c <arg> it is possible to pass a different command line to the
new instance of xenstored. This will replace the command line used
for the invocation of the just running xenstored instance.

The running xenstored (or xenstore-stubdom) needs to support live
updating, of course.

For now just add a small dummy handler to C xenstore denying any
live update action.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Julien Grall <jgrall@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
  • Loading branch information
jgross1 committed Jan 21, 2021
1 parent 7104017 commit 7f97193
Show file tree
Hide file tree
Showing 4 changed files with 370 additions and 17 deletions.
21 changes: 21 additions & 0 deletions docs/misc/xenstore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,27 @@ CONTROL <command>|[<parameters>|]
Current commands are:
check
checks xenstored innards
live-update|<params>|+
perform a live-update of the Xenstore daemon, only to
be used via xenstore-control command.
<params> are implementation specific and are used for
different steps of the live-update processing. Currently
supported <params> are:
-f <file> specify new daemon binary
-b <size> specify size of new stubdom binary
-d <chunk-size> <binary-chunk> transfer chunk of new
stubdom binary
-c <pars> specify new command line to use
-s [-t <sec>] [-F] start live update process (-t specifies
timeout in seconds to wait for active transactions
to finish, default is 60 seconds; -F will force
live update to happen even with running transactions
after timeout elapsed)
-a abort live update handling
All sub-options will return "OK" in case of success or an
error string in case of failure. -s can return "BUSY" in case
of an active transaction, a retry of -s can be done in that
case.
log|on
turn xenstore logging on
log|off
Expand Down
3 changes: 2 additions & 1 deletion tools/xenstore/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CFLAGS += -include $(XEN_ROOT)/tools/config.h
CFLAGS += -I./include
CFLAGS += $(CFLAGS_libxenevtchn)
CFLAGS += $(CFLAGS_libxenctrl)
CFLAGS += $(CFLAGS_libxenguest)
CFLAGS += $(CFLAGS_libxentoolcore)
CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\""
CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\""
Expand Down Expand Up @@ -81,7 +82,7 @@ xenstore: xenstore_client.o
$(CC) $< $(LDFLAGS) $(LDLIBS_libxenstore) $(LDLIBS_libxentoolcore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)

xenstore-control: xenstore_control.o
$(CC) $< $(LDFLAGS) $(LDLIBS_libxenstore) $(LDLIBS_libxentoolcore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
$(CC) $< $(LDFLAGS) $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxentoolcore) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)

xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o
$(CC) $^ $(LDFLAGS) -o $@ $(APPEND_LDFLAGS)
Expand Down

0 comments on commit 7f97193

Please sign in to comment.