[xen/f19] fix xendomains issue introduced by xl migrate --debug patch

myoung myoung at fedoraproject.org
Tue Dec 16 23:43:24 UTC 2014


commit a6cc7463a01ddae5c332a7e82da0f212b8040b4e
Author: Michael Young <m.a.young at durham.ac.uk>
Date:   Tue Dec 16 23:42:39 2014 +0000

    fix xendomains issue introduced by xl migrate --debug patch

 xen.spec                        |    7 ++++++-
 xl.migrate.debug.fail.fix.patch |   36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/xen.spec b/xen.spec
index 8653771..50d822e 100644
--- a/xen.spec
+++ b/xen.spec
@@ -27,7 +27,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 4.2.5
-Release: 7%{?dist}
+Release: 8%{?dist}
 Group:   Development/Libraries
 License: GPLv2+ and LGPLv2+ and BSD
 URL:     http://xen.org/
@@ -94,6 +94,7 @@ Patch117: xen.git-3460eeb3fc2811efcf2e8ac13a0882ab72ef92bc.patch
 Patch118: xl.migrate.debug.crash.patch
 Patch119: xl.migrate.debug.fail.patch
 Patch120: xsa114-4.2.patch
+Patch121: xl.migrate.debug.fail.fix.patch
 
 Patch100: xen-configure-xend.patch
 
@@ -278,6 +279,7 @@ manage Xen virtual machines.
 %patch118 -p1
 %patch119 -p1
 %patch120 -p1
+%patch121 -p1
 
 %patch100 -p1
 
@@ -771,6 +773,9 @@ rm -rf %{buildroot}
 %endif
 
 %changelog
+* Tue Dec 16 2014 Michael Young <m.a.young at durham.ac.uk> - 4.2.5-8
+- fix xendomains issue introduced by xl migrate --debug patch
+
 * Mon Dec 08 2014 Michael Young <m.a.young at durham.ac.uk> - 4.2.5-7
 - p2m lock starvation [XSA-114, CVE-2014-9065]
 - fix build with --without xsm
diff --git a/xl.migrate.debug.fail.fix.patch b/xl.migrate.debug.fail.fix.patch
new file mode 100644
index 0000000..cd33143
--- /dev/null
+++ b/xl.migrate.debug.fail.fix.patch
@@ -0,0 +1,36 @@
+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 at xxxxxxxxx>
+Signed-off-by: Wei Liu <wei.liu2 at xxxxxxxxxx>
+Cc: M A Young <m.a.young at xxxxxxxxxxxx>
+Cc: Ian Campbell <ian.campbell at xxxxxxxxxx>
+Release-Acked-by: Konrad Wilk <konrad.wilk at xxxxxxxxxx>
+---
+ tools/libxl/xl_cmdimpl.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+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)
+-- 
+1.7.10.4


More information about the scm-commits mailing list