Re: [libvirt] [Xen-devel] [libvirt bisection] complete build-armhf-libvirt
by Ian Campbell
Xen's automated testing of libvirt against newer Xen's has found a build
issue which it has bisected down to "blockcopy: expose new API in
virsh".
An instance of the failure can be found in flight 30154:
http://lists.xen.org/archives/html/xen-devel/2014-09/msg01063.html
links to the logs =>
http://www.chiark.greenend.org.uk/~xensrcts/logs/30154/
click the header of a failing column =>
http://www.chiark.greenend.org.uk/~xensrcts/logs/30154/build-armhf-libvir...
click the failing step =>
http://www.chiark.greenend.org.uk/~xensrcts/logs/30154/build-armhf-libvir...
virsh-domain.c: In function 'cmdBlockCopy':
virsh-domain.c:2003:17: error: comparison is always false due to limited range of data type [-Werror=type-limits]
cc1: all warnings being treated as errors
It seems to be failing similarly on i386 and I suppose most 32-bit
arches.
Cheers,
Ian.
On Mon, 2014-09-08 at 19:30 +0100, xen.org wrote:
> branch xen-unstable
> xen branch xen-unstable
> job build-armhf-libvirt
> test libvirt-build
>
> Tree: gnulib_libvirt git://drall.uk.xensource.com:9419/git://git.sv.gnu.org/gnulib.git%20[fetc...
> Tree: libvirt git://libvirt.org/libvirt.git
> Tree: qemuu git://xenbits.xen.org/staging/qemu-upstream-unstable.git
> Tree: xen git://xenbits.xen.org/xen.git
>
> *** Found and reproduced problem changeset ***
>
> Bug is in tree: libvirt git://libvirt.org/libvirt.git
> Bug introduced: c1d75deea228e7f4a7462aef143e18c456b2a82c
> Bug not present: 0e8bed817705664764db408c93ba54277ef85157
>
>
> commit c1d75deea228e7f4a7462aef143e18c456b2a82c
> Author: Eric Blake <eblake(a)redhat.com>
> Date: Fri Aug 29 15:47:28 2014 -0600
>
> blockcopy: expose new API in virsh
>
> Expose the new power of virDomainBlockCopy through virsh (well,
> all but the finer-grained bandwidth, as that is its own can of
> worms for a later patch). Continue to use the older API where
> possible, for maximum compatibility.
>
> The command now requires either --dest (with optional --format
> and --blockdev), to directly describe the file destination, or
> --xml, to name a file that contains an XML description such as:
>
> <disk type='network'>
> <driver type='raw'/>
> <source protocol='gluster' name='vol1/img'>
> <host name='red'/>
> </source>
> </disk>
>
> [well, it may be a while before the qemu driver is actually patched
> to act on that particular xml beyond just parsing it, but the virsh
> interface won't need changing at that time]
>
> Non-zero option parameters are converted into virTypedParameters,
> and if anything requires the new API, the command can synthesize
> appropriate XML even if the --dest option was used instead of --xml.
>
> The existing --raw flag remains for back-compat, but the preferred
> spelling is now --format=raw, since the new API now allows us
> to specify all formats rather than just a boolean raw to suppress
> probing.
>
> I hope I did justice in describing the effects of granularity and
> buf-size on how they get passed through to qemu.
>
> * tools/virsh-domain.c (cmdBlockCopy): Add new options --xml,
> --granularity, --buf-size, --format. Make --raw an alias for
> --format=raw. Call new API if new parameters are in use.
> * tools/virsh.pod (blockcopy): Document new options.
>
> Signed-off-by: Eric Blake <eblake(a)redhat.com>
>
>
> For bisection revision-tuple graph see:
> http://www.chiark.greenend.org.uk/~xensrcts/results/bisect.libvirt.build-...
> Revision IDs in each graph node refer, respectively, to the Trees above.
>
> ----------------------------------------
> Searching for failure / basis pass:
> 30154 fail [host=marilith-n4] / 30147 ok.
> Failure / basis pass flights: 30154 / 30147
> Tree: gnulib_libvirt git://drall.uk.xensource.com:9419/git://git.sv.gnu.org/gnulib.git%20[fetc...
> Tree: libvirt git://libvirt.org/libvirt.git
> Tree: qemuu git://xenbits.xen.org/staging/qemu-upstream-unstable.git
> Tree: xen git://xenbits.xen.org/xen.git
> Latest 2bf7326e10fae4abef536486aa9819331596c379 a48362cdfeb5c948218a2e4bf7cc9354082fc1b6 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> Basis pass 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0eaad0a39c67bdddc56d608ff28fcb490c12b8b3 ea772ca487e219e5d5b82d50da460c4145238038 c33fe5459732fc85c2c279c5e8ed316b8601c58c
> Generating revisions with ./adhoc-revtuple-generator git://drall.uk.xensource.com:9419/git://git.sv.gnu.org/gnulib.git%20[fetc... git://libvirt.org/libvirt.git#0eaad0a39c67bdddc56d608ff28fcb490c12b8b3-a4... git://xenbits.xen.org/staging/qemu-upstream-unstable.git#ea772ca487e219e5... git://xenbits.xen.org/xen.git#c33fe5459732fc85c2c279c5e8ed316b8601c58c-93...
> + exec
> + sh -xe
> + cd /export/home/osstest/repos/gnulib
> + git remote set-url origin git://drall.uk.xensource.com:9419/git://git.sv.gnu.org/gnulib.git%20[fetc...
> + git fetch -p origin +refs/heads/*:refs/remotes/origin/*
> + exec
> + sh -xe
> + cd /export/home/osstest/repos/libvirt
> + git remote set-url origin git://drall.uk.xensource.com:9419/git://libvirt.org/libvirt.git
> + git fetch -p origin +refs/heads/*:refs/remotes/origin/*
> + exec
> + sh -xe
> + cd /export/home/osstest/repos/xen
> + git remote set-url origin git://drall.uk.xensource.com:9419/git://xenbits.xen.org/xen.git
> + git fetch -p origin +refs/heads/*:refs/remotes/origin/*
> + exec
> + sh -xe
> + cd /export/home/osstest/repos/gnulib
> + git remote set-url origin git://drall.uk.xensource.com:9419/git://git.sv.gnu.org/gnulib.git%20[fetc...
> + git fetch -p origin +refs/heads/*:refs/remotes/origin/*
> + exec
> + sh -xe
> + cd /export/home/osstest/repos/libvirt
> + git remote set-url origin git://drall.uk.xensource.com:9419/git://libvirt.org/libvirt.git
> + git fetch -p origin +refs/heads/*:refs/remotes/origin/*
> + exec
> + sh -xe
> + cd /export/home/osstest/repos/xen
> + git remote set-url origin git://drall.uk.xensource.com:9419/git://xenbits.xen.org/xen.git
> + git fetch -p origin +refs/heads/*:refs/remotes/origin/*
> Loaded 3001 nodes in revision graph
> Searching for test results:
> 30147 pass 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0eaad0a39c67bdddc56d608ff28fcb490c12b8b3 ea772ca487e219e5d5b82d50da460c4145238038 c33fe5459732fc85c2c279c5e8ed316b8601c58c
> 30162 fail 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d c1d75deea228e7f4a7462aef143e18c456b2a82c ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30159 pass 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0eaad0a39c67bdddc56d608ff28fcb490c12b8b3 ea772ca487e219e5d5b82d50da460c4145238038 c33fe5459732fc85c2c279c5e8ed316b8601c58c
> 30167 pass 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0e8bed817705664764db408c93ba54277ef85157 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30154 fail 2bf7326e10fae4abef536486aa9819331596c379 a48362cdfeb5c948218a2e4bf7cc9354082fc1b6 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30161 pass 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0eaad0a39c67bdddc56d608ff28fcb490c12b8b3 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30160 fail 2bf7326e10fae4abef536486aa9819331596c379 a48362cdfeb5c948218a2e4bf7cc9354082fc1b6 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30163 pass 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0e8bed817705664764db408c93ba54277ef85157 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30165 pass 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0e8bed817705664764db408c93ba54277ef85157 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30164 fail 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d c1d75deea228e7f4a7462aef143e18c456b2a82c ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30166 fail 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d c1d75deea228e7f4a7462aef143e18c456b2a82c ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> 30168 fail 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d c1d75deea228e7f4a7462aef143e18c456b2a82c ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> Searching for interesting versions
> Result found: flight 30147 (pass), for basis pass
> Result found: flight 30154 (fail), for basis failure
> Repro found: flight 30159 (pass), for basis pass
> Repro found: flight 30160 (fail), for basis failure
> 0 revisions at 9565c3be73eb6d76b7b42a21d68d2e00a62abb6d 0e8bed817705664764db408c93ba54277ef85157 ea772ca487e219e5d5b82d50da460c4145238038 93d5f192d4903953baa8c2115534d23140236176
> No revisions left to test, checking graph state.
> Result found: flight 30163 (pass), for last pass
> Result found: flight 30164 (fail), for first failure
> Repro found: flight 30165 (pass), for last pass
> Repro found: flight 30166 (fail), for first failure
> Repro found: flight 30167 (pass), for last pass
> Repro found: flight 30168 (fail), for first failure
>
> *** Found and reproduced problem changeset ***
>
> Bug is in tree: libvirt git://libvirt.org/libvirt.git
> Bug introduced: c1d75deea228e7f4a7462aef143e18c456b2a82c
> Bug not present: 0e8bed817705664764db408c93ba54277ef85157
>
> + exec
> + sh -xe
> + cd /export/home/osstest/repos/libvirt
> + git remote set-url origin git://drall.uk.xensource.com:9419/git://libvirt.org/libvirt.git
> + git fetch -p origin +refs/heads/*:refs/remotes/origin/*
>
> commit c1d75deea228e7f4a7462aef143e18c456b2a82c
> Author: Eric Blake <eblake(a)redhat.com>
> Date: Fri Aug 29 15:47:28 2014 -0600
>
> blockcopy: expose new API in virsh
>
> Expose the new power of virDomainBlockCopy through virsh (well,
> all but the finer-grained bandwidth, as that is its own can of
> worms for a later patch). Continue to use the older API where
> possible, for maximum compatibility.
>
> The command now requires either --dest (with optional --format
> and --blockdev), to directly describe the file destination, or
> --xml, to name a file that contains an XML description such as:
>
> <disk type='network'>
> <driver type='raw'/>
> <source protocol='gluster' name='vol1/img'>
> <host name='red'/>
> </source>
> </disk>
>
> [well, it may be a while before the qemu driver is actually patched
> to act on that particular xml beyond just parsing it, but the virsh
> interface won't need changing at that time]
>
> Non-zero option parameters are converted into virTypedParameters,
> and if anything requires the new API, the command can synthesize
> appropriate XML even if the --dest option was used instead of --xml.
>
> The existing --raw flag remains for back-compat, but the preferred
> spelling is now --format=raw, since the new API now allows us
> to specify all formats rather than just a boolean raw to suppress
> probing.
>
> I hope I did justice in describing the effects of granularity and
> buf-size on how they get passed through to qemu.
>
> * tools/virsh-domain.c (cmdBlockCopy): Add new options --xml,
> --granularity, --buf-size, --format. Make --raw an alias for
> --format=raw. Call new API if new parameters are in use.
> * tools/virsh.pod (blockcopy): Document new options.
>
> Signed-off-by: Eric Blake <eblake(a)redhat.com>
>
> Revision graph left in /home/xc_osstest/results/bisect.libvirt.build-armhf-libvirt.libvirt-build.{dot,ps,png,html}.
> ----------------------------------------
> 30168: tolerable ALL FAIL
>
> flight 30168 libvirt real-bisect [real]
> http://www.chiark.greenend.org.uk/~xensrcts/logs/30168/
>
> Failures :-/ but no regressions.
>
> Tests which did not succeed,
> including tests which could not be run:
> build-armhf-libvirt 5 libvirt-build fail baseline untested
>
>
> jobs:
> build-armhf-libvirt fail
>
>
> ------------------------------------------------------------
> sg-report-flight on osstest.cam.xci-test.com
> logs: /home/xc_osstest/logs
> images: /home/xc_osstest/images
>
> Logs, config files, etc. are available at
> http://www.chiark.greenend.org.uk/~xensrcts/logs
>
> Test harness code can be found at
> http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel(a)lists.xen.org
> http://lists.xen.org/xen-devel
10 years, 2 months
[libvirt] [PATCH v3 00/18] Implement virDomainBlockCopy
by Eric Blake
Took me longer than I wanted to get v3 posted. There's lots of
new patches in this version, based on feedback on v2.
Among other things, the bandwidth of virDomainBlockCopy is in
bytes/s, and all the remaining interfaces are updated to use a
flags value to decide whether to use bytes/s instead of the
back-compat MiB/s.
I really want patch 1 in 1.2.8; pasth 2-17 would be nice but
it may be better to delay to later, and I still don't have
virsh updated to cover the changed proposed in patch 18 so that
one should probably wait.
Eric Blake (18):
blockcopy: allow larger buf-size
blockjob: shuffle block rebase code
blockjob: split out block info driver handling
blockjob: split out block info monitor handling
blockjob: hoist bandwidth scaling out of monitor code
blockjob: allow finer bandwidth tuning for query
blockjob: split up virsh blockjob info
blockjob: add new --raw flag to virsh blockjob
blockjob: add new --bytes flag to virsh blockjob
blockcopy: allow block device destination
blockcopy: split out virsh implementation
blockcopy: expose new API in virsh
blockcopy: remote implementation for new API
blockcopy: tweak how rebase calls into copy
blockcopy: add a way to parse disk source
blockcopy: add qemu implementation of new API
blockcopy: add qemu implementation of new tunables
blockjob: allow finer bandwidth tuning for set speed
include/libvirt/libvirt.h.in | 77 +++--
src/conf/domain_conf.c | 107 ++++--
src/conf/domain_conf.h | 4 +
src/libvirt.c | 99 ++++--
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 382 ++++++++++++++++-----
src/qemu/qemu_migration.c | 10 +-
src/qemu/qemu_monitor.c | 108 +++---
src/qemu/qemu_monitor.h | 16 +-
src/qemu/qemu_monitor_json.c | 80 +++--
src/qemu/qemu_monitor_json.h | 9 +-
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 18 +-
src/remote_protocol-structs | 11 +
tests/qemumonitorjsontest.c | 2 +-
.../qemuxml2argvdata/qemuxml2argv-disk-mirror.xml | 4 +-
tools/virsh-domain.c | 336 ++++++++++++++----
tools/virsh.c | 2 +
tools/virsh.h | 2 +
tools/virsh.pod | 65 ++--
20 files changed, 975 insertions(+), 359 deletions(-)
--
1.9.3
10 years, 2 months
[libvirt] ANNOUNCE: libvirt 1.1.3.6 maintenance release
by Cole Robinson
libvirt 1.1.3.6 maintenance release is now available. This is
libvirt 1.1.3 with additional bugfixes that have accumulated
upstream since the initial release.
This release can be downloaded at:
http://libvirt.org/sources/stable_updates/libvirt-1.1.3.6.tar.gz
Changes in this version:
* fix api changes in xen restore
* maint: fix typo in previous patch
* maint: cleanup detection of const'ness of selinux ctx
* build: fix build with libselinux 2.3
* virerror: Fix an error message typo
* storage: Report error from VolOpen by default
* storage: Rename VolOpenCheckMode to VolOpen
* storage: move block format lookup to shared UpdateVolInfo
* storage: Rename UpdateVolInfoFlags to UpdateVolInfo
* LXC: fix the problem that libvirt lxc fail to start on latest kernel
* Fix pci bus naming for PPC
* libxl: Check for control_d string to decide about dom0
* Free ifname in testDomainGenerateIfnames
* Don't include @LIBS@ in libvirt.pc.in file
* qemu: copy: Accept 'format' parameter when copying to a non-existing
img
* build: fix 'make check' with newer git
* docs: publish correct enum values
* qemu: blockcopy: Don't remove existing disk mirror info
* LSN-2014-0003: Don't expand entities when parsing XML
* libxl: fix framebuffer port setting for HVM domains
For info about past maintenance releases, see:
http://wiki.libvirt.org/page/Maintenance_Releases
Thanks,
Cole
10 years, 2 months
[libvirt] [PATCH] blockjob: avoid 32-bit compilation warning
by Eric Blake
Commit c1d75de caused this warning on 32-bit platforms (fatal when
-Werror is enabled):
virsh-domain.c: In function 'cmdBlockCopy':
virsh-domain.c:2003:17: error: comparison is always false due to limited range of data type [-Werror=type-limits]
Forcing the left side of the < to be ull instead of ul shuts up
the 32-bit compiler while still protecting 64-bit code from overflow.
* tools/virsh-domain.c (cmdBlockCopy): Add type coercion.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
tools/virsh-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 39ff798..ed2e3ea 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -2000,7 +2000,7 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)
if (bandwidth) {
/* bandwidth is ulong MiB/s, but the typed parameter is
* ullong bytes/s; make sure we don't overflow */
- if (bandwidth > ULLONG_MAX >> 20) {
+ if (bandwidth + 0ULL > ULLONG_MAX >> 20) {
virReportError(VIR_ERR_OVERFLOW,
_("bandwidth must be less than %llu"),
ULLONG_MAX >> 20);
--
1.9.3
10 years, 2 months
[libvirt] [PATCH] util: let virSetSockReuseAddr report unified error message
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/rpc/virnetsocket.c | 7 ++-----
src/util/virportallocator.c | 5 +----
src/util/virutil.c | 13 ++++++++++---
src/util/virutil.h | 2 +-
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 586a0d7..2192dc8 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -278,10 +278,8 @@ int virNetSocketNewListenTCP(const char *nodename,
goto error;
}
- if (virSetSockReuseAddr(fd) < 0) {
- virReportSystemError(errno, "%s", _("Unable to enable port reuse"));
+ if (virSetSockReuseAddr(fd, true) < 0)
goto error;
- }
#ifdef IPV6_V6ONLY
if (runp->ai_family == PF_INET6) {
@@ -493,9 +491,8 @@ int virNetSocketNewConnectTCP(const char *nodename,
goto error;
}
- if (virSetSockReuseAddr(fd) < 0) {
+ if (virSetSockReuseAddr(fd, false) < 0)
VIR_WARN("Unable to enable port reuse");
- }
if (connect(fd, runp->ai_addr, runp->ai_addrlen) >= 0)
break;
diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c
index ff5691a..f1dade3 100644
--- a/src/util/virportallocator.c
+++ b/src/util/virportallocator.c
@@ -142,11 +142,8 @@ static int virPortAllocatorBindToPort(bool *used,
goto cleanup;
}
- if (virSetSockReuseAddr(fd) < 0) {
- virReportSystemError(errno, "%s",
- _("Unable to set socket reuse addr flag"));
+ if (virSetSockReuseAddr(fd, true) < 0)
goto cleanup;
- }
if (ipv6 && setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&v6only,
sizeof(v6only)) < 0) {
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 04113bb..8d2f62a 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -148,7 +148,7 @@ int virSetCloseExec(int fd)
}
#ifdef WIN32
-int virSetSockReuseAddr(int fd ATTRIBUTE_UNUSED)
+int virSetSockReuseAddr(int fd ATTRIBUTE_UNUSED, bool fatal ATTRIBUTE_UNUSED)
{
/*
* SO_REUSEADDR on Windows is actually akin to SO_REUSEPORT
@@ -163,10 +163,17 @@ int virSetSockReuseAddr(int fd ATTRIBUTE_UNUSED)
return 0;
}
#else
-int virSetSockReuseAddr(int fd)
+int virSetSockReuseAddr(int fd, bool fatal)
{
int opt = 1;
- return setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ int ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+
+ if (ret < 0 && fatal) {
+ virReportSystemError(errno, "%s",
+ _("Unable to set socket reuse addr flag"));
+ }
+
+ return ret;
}
#endif
diff --git a/src/util/virutil.h b/src/util/virutil.h
index 89b7923..54f1148 100644
--- a/src/util/virutil.h
+++ b/src/util/virutil.h
@@ -43,7 +43,7 @@ int virSetBlocking(int fd, bool blocking) ATTRIBUTE_RETURN_CHECK;
int virSetNonBlock(int fd) ATTRIBUTE_RETURN_CHECK;
int virSetInherit(int fd, bool inherit) ATTRIBUTE_RETURN_CHECK;
int virSetCloseExec(int fd) ATTRIBUTE_RETURN_CHECK;
-int virSetSockReuseAddr(int fd) ATTRIBUTE_RETURN_CHECK;
+int virSetSockReuseAddr(int fd, bool fatal) ATTRIBUTE_RETURN_CHECK;
int virPipeReadUntilEOF(int outfd, int errfd,
char **outbuf, char **errbuf);
--
2.1.0
10 years, 2 months
[libvirt] [PATCH] esx: Add the actual product version to the error message.
by Richard W.M. Jones
This is just an old patch I had from when I was trying to use the
'esx://' URI scheme to access a vCenter resource (which turns out to
use 'vpx://' instead, which was the problem I was having).
It's useful for debugging purposes to print the actual product version
from the server in the error message.
Rich.
10 years, 2 months
[libvirt] [PATCH] qemu: panic device: check for invalid address type
by Erik Skultety
qemu now checks for invalid address type for a panic device, which is
currently implemented only to use ISA address type, thus rejecting
any other options, except for leaving XML attributes blank, in that case,
defaults are used (this behaviour remains the same from earlier verions).
---
src/qemu/qemu_command.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 1ca98fb..2611799 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9418,12 +9418,16 @@ qemuBuildCommandLine(virConnectPtr conn,
if (def->panic) {
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PANIC)) {
- if (def->panic->info.addr.isa.iobase > 0) {
+ if (def->panic->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_ISA) {
virCommandAddArg(cmd, "-device");
virCommandAddArgFormat(cmd, "pvpanic,ioport=%d",
def->panic->info.addr.isa.iobase);
- } else {
+ } else if (def->panic->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
virCommandAddArgList(cmd, "-device", "pvpanic", NULL);
+ } else {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("panic device only works with ISA address type"));
+ goto error;
}
} else {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
--
1.9.3
10 years, 2 months
[libvirt] [PATCH] qemu: Propagate QEMU errors during incoming migrations
by Jiri Denemark
When QEMU fails during incoming migration after we successfully started
it (i.e., during Perform or Finish phase), we report a rather unhelpful
message
Unable to read from monitor: Connection reset by peer
We already have a code that takes error messages from QEMU's error
output but we disable it once QEMU successfully starts. This patch
postpones this until the end of Finish phase during incoming migration
so that we can report a much better error message:
internal error: early end of file from monitor: possible problem:
Unknown savevm section or instance '0000:00:05.0/virtio-balloon' 0
load of migration failed
https://bugzilla.redhat.com/show_bug.cgi?id=1090093
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 2 ++
src/qemu/qemu_monitor.c | 7 ++++++-
src/qemu/qemu_process.c | 6 ++++--
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index f2b421e..64f0d8d 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -4689,6 +4689,8 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
cleanup:
virPortAllocatorRelease(driver->migrationPorts, port);
if (vm) {
+ if (priv->mon)
+ qemuMonitorSetDomainLog(priv->mon, -1);
VIR_FREE(priv->origname);
virObjectUnlock(vm);
}
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index d96b1b8..3bb6cb9 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -631,8 +631,11 @@ qemuMonitorIO(int watch, int fd, int events, void *opaque)
error = true;
} else {
if (events & VIR_EVENT_HANDLE_WRITABLE) {
- if (qemuMonitorIOWrite(mon) < 0)
+ if (qemuMonitorIOWrite(mon) < 0) {
error = true;
+ if (errno == ECONNRESET)
+ hangup = true;
+ }
events &= ~VIR_EVENT_HANDLE_WRITABLE;
}
@@ -642,6 +645,8 @@ qemuMonitorIO(int watch, int fd, int events, void *opaque)
events &= ~VIR_EVENT_HANDLE_READABLE;
if (got < 0) {
error = true;
+ if (errno == ECONNRESET)
+ hangup = true;
} else if (got == 0) {
eof = true;
} else {
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 38ed3fe..b1d8a32 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4379,8 +4379,10 @@ int qemuProcessStart(virConnectPtr conn,
goto cleanup;
}
- /* unset reporting errors from qemu log */
- qemuMonitorSetDomainLog(priv->mon, -1);
+ /* Keep watching qemu log for errors during incoming migration, otherwise
+ * unset reporting errors from qemu log. */
+ if (!migrateFrom)
+ qemuMonitorSetDomainLog(priv->mon, -1);
virCommandFree(cmd);
VIR_FORCE_CLOSE(logfile);
--
2.1.0
10 years, 2 months