[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/5] remus: resume immediately if libxl__xc_domain_save_done() completes
On Mon, 2016-01-18 at 13:40 +0800, Wen Congyang wrote: > For example: if the secondary host is down, and we fail to send the data to > the secondary host. xc_domain_save() returns 0. So in the function > libxl__xc_domain_save_done(), rc is 0(the helper program exits normally), > and retval is 0(it is xc_domain_save()'s return value). In such case, we > just need to complete the stream. What if the secondary host isn't actually down but just communication has failed for some reason? Won't both primary and secondary start their respective versions of the domain? What are the consequences of that? (Corruption?) I suppose this is a consequence of the lack of STONITH or splitbrain handling within Remus. Are there any plans to address this? > Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx> > Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > --- > Âtools/libxl/libxl.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ5 ++++- > Âtools/libxl/libxl_stream_write.c | 14 ++++++++++++-- > Â2 files changed, 16 insertions(+), 3 deletions(-) > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > index abb2845..d50c3fb 100644 > --- a/tools/libxl/libxl.c > +++ b/tools/libxl/libxl.c > @@ -884,7 +884,10 @@ int libxl_domain_remus_start(libxl_ctx *ctx, > libxl_domain_remus_info *info, > Â > ÂÂÂÂÂassert(info); > Â > -ÂÂÂÂ/* Point of no return */ > +ÂÂÂÂ/* > +ÂÂÂÂÂ* This function doesn't return until something is wrong, and > +ÂÂÂÂÂ* we need to do failover from secondary. I was actually hoping for user/API documentation (i.e. in a public header) rather than a code comment, I suppose this will do though. > +ÂÂÂÂÂÂÂÂif (dss->remus) > +ÂÂÂÂÂÂÂÂÂÂÂÂ/* > +ÂÂÂÂÂÂÂÂÂÂÂÂÂ* For remus, if libxl__xc_domain_save_done() completes, > +ÂÂÂÂÂÂÂÂÂÂÂÂÂ* there was an error sending data to the secondary. > +ÂÂÂÂÂÂÂÂÂÂÂÂÂ* Resume the primary ASAP. The caller doesn't care of the > +ÂÂÂÂÂÂÂÂÂÂÂÂÂ* return value(Please refer to libxl__remus_teardown()) There should usually be a space before a ( in text/prose (also in the changelog). > +ÂÂÂÂÂÂÂÂÂÂÂÂÂ*/ > +ÂÂÂÂÂÂÂÂÂÂÂÂstream_complete(egc, stream, 0); > +ÂÂÂÂÂÂÂÂelse > +ÂÂÂÂÂÂÂÂÂÂÂÂwrite_emulator_xenstore_record(egc, stream); > +ÂÂÂÂ} > Â} > Â > Âstatic void write_emulator_xenstore_record(libxl__egc *egc, _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |