From: Andrew Cooper <andrew.cooper3@citrix.com>
To: M A Young <m.a.young@durham.ac.uk>, xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] fix migration failure with xl migrate --debug
Date: Wed, 26 Nov 2014 21:17:56 +0000 [thread overview]
Message-ID: <54764384.5010008@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1411262044580.18257@procyon.dur.ac.uk>
[-- Attachment #1.1: Type: text/plain, Size: 1888 bytes --]
On 26/11/2014 20:51, M A Young wrote:
> Migrations with xl migrate --debug will fail because debugging
> information from the receiving process is written to the stdout
> channel. This channel is also used for status messages so the
> migration will fail as the sending process receives an unexpected
> message. This patch moves the debugging information to the stderr
> channel.
>
> Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Ah yes - that will do.
The whole info/error/debug handling here is a mess. Amongst other
issues, it is not possible to distinguish whether libxc logging messages
are coming from the sending or receiving side, without judging the
context from the text itself.
>
> Use stderr for debugging messages for xl migrate --debug as stdout is used
> for status messages.
>
> --- xen-4.5.0-rc1/tools/libxl/xl_cmdimpl.c.orig 2014-10-24 15:22:40.000000000 +0100
> +++ xen-4.5.0-rc1/tools/libxl/xl_cmdimpl.c 2014-11-25 20:29:06.723856433 +0000
> @@ -383,7 +383,7 @@
Sadly, changing printf_info() like this has an unintended knock-on
effect to create_domain() (xl create, migrate-recevive, restore) and xl
config-update. I think you might have to pass FILE pointers all the way
through.
> libxl_domain_config *d_config)
> {
> if (output_format == OUTPUT_FORMAT_SXP)
> - return printf_info_sexp(domid, d_config);
> + return printf_info_sexp(domid, d_config, stderr);
>
> const char *buf;
> libxl_yajl_length len = 0;
> @@ -404,7 +404,7 @@
> if (s != yajl_gen_status_ok)
> goto out;
>
> - puts(buf);
> + fputs(buf,stderr);
puts() and fputs() are not quite synonymous. puts() will
unconditionally add an extra newline to stdout. It is unclear whether
the string from yajl_gen_get_buf() comes with a trailing newline or
not. If the output looks ok, it probably is fine.
~Andrew
[-- Attachment #1.2: Type: text/html, Size: 2956 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-11-26 21:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 20:51 [PATCH] fix migration failure with xl migrate --debug M A Young
2014-11-26 21:17 ` Andrew Cooper [this message]
2014-11-27 23:39 ` M A Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54764384.5010008@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=m.a.young@durham.ac.uk \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.