|
|
436d0fe |
In commit d36a3734a ("xl: fix migration failure with xl migrate
|
|
|
436d0fe |
--debug"), message is printed to stderr for both debug mode
|
|
|
436d0fe |
and dryrun mode. That caused rdname() in xendomains fails to parse
|
|
|
436d0fe |
domain name since it's expecting input from xl's stdout.
|
|
|
436d0fe |
|
|
|
436d0fe |
So this patch separates those two cases. If xl is running in debug mode,
|
|
|
436d0fe |
then message is printed to stderr; if xl is running in dryrun mode and
|
|
|
436d0fe |
debug is not enabled, message is printed to stdout. This will fix
|
|
|
436d0fe |
xendomains and other scripts that use "xl create --dryrun", as well as
|
|
|
436d0fe |
not re-introducing the old bug fixed in d36a3734a.
|
|
|
436d0fe |
|
|
|
436d0fe |
Reported-by: Mark Pryor <tlviewer@xxxxxxxxx>
|
|
|
436d0fe |
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
|
|
|
436d0fe |
Cc: M A Young <m.a.young@xxxxxxxxxxxx>
|
|
|
436d0fe |
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
|
|
|
436d0fe |
Release-Acked-by: Konrad Wilk <konrad.wilk@xxxxxxxxxx>
|
|
|
436d0fe |
---
|
|
|
436d0fe |
tools/libxl/xl_cmdimpl.c | 3 ++-
|
|
|
436d0fe |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
436d0fe |
|
|
|
436d0fe |
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
|
|
|
436d0fe |
index 3737c7e..ed0d478 100644
|
|
|
436d0fe |
--- a/tools/libxl/xl_cmdimpl.c
|
|
|
436d0fe |
+++ b/tools/libxl/xl_cmdimpl.c
|
|
|
436d0fe |
@@ -2473,7 +2473,8 @@ static uint32_t create_domain(struct domain_create *dom_info)
|
|
|
436d0fe |
}
|
|
|
436d0fe |
|
|
|
436d0fe |
if (debug || dom_info->dryrun)
|
|
|
436d0fe |
- printf_info(default_output_format, -1, &d_config, stderr);
|
|
|
436d0fe |
+ printf_info(default_output_format, -1, &d_config,
|
|
|
436d0fe |
+ debug ? stderr : stdout);
|
|
|
436d0fe |
|
|
|
436d0fe |
ret = 0;
|
|
|
436d0fe |
if (dom_info->dryrun)
|
|
|
436d0fe |
--
|
|
|
436d0fe |
1.7.10.4
|