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

[Xen-changelog] [xen master] xl: print message to stdout when (!debug && dryrun)



commit 09b7ff1a118f5e920ef12f5592f3ce991218962a
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Mon Dec 15 10:56:24 2014 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Dec 16 12:46:17 2014 +0000

    xl: print message to stdout when (!debug && dryrun)
    
    In commit d36a3734a ("xl: fix migration failure with xl migrate
    --debug"), message is printed to stderr for both debug mode
    and dryrun mode. That caused rdname() in xendomains fails to parse
    domain name since it's expecting input from xl's stdout.
    
    So this patch separates those two cases. If xl is running in debug mode,
    then message is printed to stderr; if xl is running in dryrun mode and
    debug is not enabled, message is printed to stdout. This will fix
    xendomains and other scripts that use "xl create --dryrun", as well as
    not re-introducing the old bug fixed in d36a3734a.
    
    Reported-by: Mark Pryor <tlviewer@xxxxxxxxx>
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Cc: M A Young <m.a.young@xxxxxxxxxxxx>
    Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Release-Acked-by: Konrad Wilk <konrad.wilk@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 3737c7e..ed0d478 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -2473,7 +2473,8 @@ static uint32_t create_domain(struct domain_create 
*dom_info)
     }
 
     if (debug || dom_info->dryrun)
-        printf_info(default_output_format, -1, &d_config, stderr);
+        printf_info(default_output_format, -1, &d_config,
+                    debug ? stderr : stdout);
 
     ret = 0;
     if (dom_info->dryrun)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.