- 15 6月, 2012 40 次提交
-
-
由 Guido Günther 提交于
otherwise migration fails for e.g. network filesystems like sheepdog with: error: Invalid relative path 'virt-name': Invalid argument while we should fail with: Migration may lead to data corruption if disks use cache != none References: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676328 https://www.redhat.com/archives/libvirt-users/2012-May/msg00088.html (cherry picked from commit 3ac8fb54)
-
由 Cole Robinson 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=801656 (cherry picked from commit 9ec6f818)
-
由 Li Zhang 提交于
For pseries guest, spapr-vlan and spapr-vty is based on spapr-vio address. According to model of network device, the address type should be assigned automatically. For serial device, serial pty device is recognized as spapr-vty device, which is also on spapr-vio. So this patch is to correct the address type of spapr-vlan and spapr-vty, and build correct command line of spapr-vty. Signed-off-by: NLi Zhang <zhlcindy@linux.vnet.ibm.com> Reviewed-by: Michael Ellerman<michaele@au1.ibm.com> (cherry picked from commit 04a319ba)
-
由 Eric Blake 提交于
While libvirt intentionally avoids -Wundef (after all, C99 guarantees sane semantics of treating undefined macros as 0), the glibc insanity of #warning on _FORTIFY_SOURCE coupled with what some people feel is the black magic of autoconf means that other projects are likely to copy our snippet verbatim. We can be nicer to other projects by making it easier to integrate into projects that use -Wundef. Suggested by Christophe Fergeau. * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Be nice to other projects using -Wundef. (cherry picked from commit 1c2edf0f)
-
由 Eric Blake 提交于
There is a theoretical problem of an extreme bug where we can get into deadlock due to command handshaking. Thanks to a pair of pipes, we have a situation where the parent thinks the child reported an error and is waiting for a message from the child to explain the error; but at the same time the child thinks it reported success and is waiting for the parent to acknowledge the success; so both processes are now blocked. Thankfully, I don't think this deadlock is possible without at least one other bug in the code, but I did see exactly that sort of situation prior to commit da831afc - I saw a backtrace where a double close bug in the parent caused the parent to read from the wrong fd and assume the child failed, even though the child really sent success. This potential deadlock is not quite like commit 858c2476 (a deadlock due to multiple readers on one pipe preventing a write from completing), although the solution is similar - always close unused pipe fds before blocking, rather than after. * src/util/command.c (virCommandHandshakeWait): Close unused fds sooner. (cherry picked from commit 5e8ab391)
-
由 Cole Robinson 提交于
They have now merged. Fedora details here: https://lists.fedoraproject.org/pipermail/devel/2012-June/168227.html (cherry picked from commit dd7bc51b) Conflicts: libvirt.spec.in
-
由 Osier Yang 提交于
(cherry picked from commit ee58b581) Conflicts: tools/virsh.c
-
由 Osier Yang 提交于
(cherry picked from commit 68fcfdb8)
-
由 Osier Yang 提交于
Affected commands are: pool-start, vol-create-from. (cherry picked from commit 05f8917f)
-
由 Beat Jörg 提交于
I came across a bug that the command line generated for passthrough of the host parallel port /dev/parport0 by libvirt for QEMU is incorrect. It currently produces: -chardev tty,id=charparallel0,path=/dev/parport0 -device isa-parallel,chardev=charparallel0,id=parallel0 The first parameter is "tty". It sould be "parport". If I launch qemu with -chardev parport,... it works as expected. I have already filled a bug report ( https://bugzilla.redhat.com/show_bug.cgi?id=823879 ), the topic was already on the list some months ago: https://www.redhat.com/archives/libvirt-users/2011-September/msg00095.htmlSigned-off-by: NEric Blake <eblake@redhat.com> (cherry picked from commit 7508338f)
-
由 Eric Blake 提交于
Noticed during the previous commit. * src/util/command.c: Fix some spacing and break long lines. (cherry picked from commit a3bc393e)
-
由 Eric Blake 提交于
It is possible to deadlock libvirt by having a domain with XML longer than PIPE_BUF, and by writing a hook script that closes stdin early. This is because libvirt was keeping a copy of the child's stdin read fd open, which means the write fd in the parent will never see EPIPE (remember, libvirt should always be run with SIGPIPE ignored, so we should never get a SIGPIPE signal). Since there is no error, libvirt blocks waiting for a write to complete, even though the only reader is also libvirt. The solution is to ensure that only the child can act as a reader before the parent does any writes; and then dealing with the fallout of dealing with EPIPE. Thankfully, this is not a security hole - since the only way to trigger the deadlock is to install a custom hook script, anyone that already has privileges to install a hook script already has privileges to do any number of other equally disruptive things to libvirt; it would only be a security hole if an unprivileged user could install a hook script to DoS a privileged user. * src/util/command.c (virCommandRun): Close parent's copy of child read fd earlier. (virCommandProcessIO): Don't let EPIPE be fatal; the child may be done parsing input. * tests/commandhelper.c (main): Set up a SIGPIPE situation. * tests/commandtest.c (test20): Trigger it. * tests/commanddata/test20.log: New file. (cherry picked from commit 858c2476)
-
由 Eric Blake 提交于
glibc 2.15 (on Fedora 17) coupled with explicit disabling of optimization during development dies a painful death: In file included from /usr/include/limits.h:27:0, from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:169, from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/syslimits.h:7, from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:34, from util/bitmap.c:26: /usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] cc1: all warnings being treated as errors Work around this by only conditionally defining _FORTIFY_SOURCE, in the case where glibc can actually use it. The trick is using AH_VERBATIM instead of AC_DEFINE. * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Squelch _FORTIFY_SOURCE when needed to avoid glibc #warnings. (cherry picked from commit 2af63b1c)
-
由 Jiri Denemark 提交于
Probably a result of copy&paste... (cherry picked from commit 461ed421)
-
由 Radu Caragea 提交于
The stream lock is unlocked twice instead of being locked and then unlocked. Probably a typo. (cherry picked from commit 107f51b6) Conflicts: AUTHORS
-
由 Laine Stump 提交于
This patch resolves: https://bugzilla.redhat.com/show_bug.cgi?id=827519 The problem is that an interface with type='hostdev' will have an alias of the form "hostdev%d", while the function that looks through existing netdevs to determine the name to use for a new addition will fail if there's an existing entry that does not match the form "net%d". This is another of the handful of places that need an exception due to the hybrid nature of <interface type='hostdev'> (which is not exactly an <interface> or a <hostdev>, but is both at the same time). (cherry picked from commit 6734ce7b)
-
由 Martin Kletzander 提交于
This patch makes virt-pki-validate work with certificates that have acl or xattr set. Otherwise it failing due to wrong permissions. (cherry picked from commit d4fb6694)
-
由 Wen Congyang 提交于
If we migrate to fd, spec->fwdType is not MIGRATION_FWD_DIRECT, we will close spec->dest.fd.local in qemuMigrationRun(). So we should set spec->dest.fd.local to -1 in qemuMigrationRun(). Bug present since 0.9.5 (commit 32617617). (cherry picked from commit b19c236d)
-
由 Wen Congyang 提交于
We should not set *outfd or *errfd if virExecWithHook() failed because the caller may close these fds. Bug present since v0.4.5 (commit 60ed1d2a). (cherry picked from commit 746ff701)
-
由 Eric Blake 提交于
Wen Congyang reported that we have a double-close bug if we fail virFDStreamOpenInternal, since childfd duplicated one of the fds[] array contents. In truth, since we always transfer both members of fds to other variables, we should close the fds through those other names, and just use fds[] for pipe(). Bug present since 0.9.0 (commit e886237a). * src/fdstream.c (virFDStreamOpenFileInternal): Swap scope of childfd and fds[], to avoid a double close. (cherry picked from commit f3cfc7c8)
-
由 Eric Blake 提交于
KAMEZAWA Hiroyuki reported a nasty double-free bug when virCommand is used to convert a string into input to a child command. The problem is that the poll() loop of virCommandProcessIO would close() the write end of the pipe in order to let the child see EOF, then the caller virCommandRun() would also close the same fd number, with the second close possibly nuking an fd opened by some other thread in the meantime. This in turn can have all sorts of bad effects. The bug has been present since the introduction of virCommand in commit f16ad06f. This is based on his first attempt at a patch, at https://bugzilla.redhat.com/show_bug.cgi?id=823716 * src/util/command.c (_virCommand): Drop inpipe member. (virCommandProcessIO): Add argument, to avoid closing caller's fd without informing caller. (virCommandRun, virCommandNewArgs): Adjust clients. (cherry picked from commit da831afc)
-
由 Wen Congyang 提交于
virCommandRunAsync() will set errfd if it succeed. We should close it if virFDStreamOpenInternal() fails. (cherry picked from commit 655cffa0)
-
由 Wen Congyang 提交于
If the system does not support bypass cache, we will close fd, but it is uninitialized. (cherry picked from commit 0a045f01)
-
由 Eric Blake 提交于
Autoconf 2.60 and later insist on using ${datarootdir}, rather than the derived ${datadir} (although the latter defaults to the former, it is possible to set configure arguments so that they differ): config.status: creating libvirt.pc config.status: WARNING: 'libvirt.pc.in' seems to ignore the --datarootdir setting This patch follows the autoconf manual's suggestions for how to support 2.59 (RHEL 5) and newer simultaneously. * libvirt.pc.in (datarootdir): Define, so ${datadir} will not ignore datarootdir when using newer autoconf. (cherry picked from commit aabf77aa)
-
由 Michal Privoznik 提交于
Currently, we are logging only one side of pipes we create in virCommandRequireHandshake(); This is enough in cases where pipe2() returns two consecutive FDs. However, it is not guaranteed and it may return any FDs. Therefore, it's wise to log the other ends as well. (cherry picked from commit 7454849e)
-
由 Martin Kletzander 提交于
When getting number of CPUs the host has assigned, there was always number "1" returned. Even though all lxc domains with no pinning launched by libvirt run on all pCPUs (by default, no matter what's the number), we should at least return the same number as the user specified when creating the domain. (cherry picked from commit 87dfdb0b)
-
由 Dave Allan 提交于
A while back I wrote the attached code to demonstrate how to use events and serial console to create a serial console that stays up even when the VM is down. It might need some work, as I am not terribly strong with Python. * examples/python/consolecallback.py: New file. * examples/python/Makefile.am (EXTRA_DIST): Ship it. (cherry picked from commit ffc9f7ab)
-
由 Stefan Berger 提交于
==3240== 23 bytes in 1 blocks are definitely lost in loss record 242 of 744 ==3240== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==3240== by 0x8077537: __vasprintf_chk (vasprintf_chk.c:82) ==3240== by 0x509C677: virVasprintf (stdio2.h:199) ==3240== by 0x509C733: virAsprintf (util.c:1912) ==3240== by 0x1906583A: qemudStartup (qemu_driver.c:679) ==3240== by 0x511991D: virStateInitialize (libvirt.c:809) ==3240== by 0x40CD84: daemonRunStateInit (libvirtd.c:751) ==3240== by 0x5098745: virThreadHelper (threads-pthread.c:161) ==3240== by 0x7953D8F: start_thread (pthread_create.c:309) ==3240== by 0x805FF5C: clone (clone.S:115) (cherry picked from commit 67dd486f)
-
由 Martin Kletzander 提交于
"accel3d" was specified twice, the second one is obviously "accel2d" (also from the text down below. (cherry picked from commit 94618eb6)
-
由 Daniel P. Berrange 提交于
Currently all the config options are listed under a 'vnc_entry' group. Create a bunch of new groups & move options to the right place Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 6c10c04c)
-
由 Daniel P. Berrange 提交于
Add nmissing 'host_uuid' entry to libvirtd.conf lens and rename spice_passwd to spice_password in qemu.conf lens Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit a9c779ca)
-
由 Daniel P. Berrange 提交于
Instead of doing # example_config use #example_config so it is possible to programatically uncomment example config options, as distinct from their comment/descriptions Also delete rogue trailing comma not allowed by lens Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit c5c3278e) (crobinso: Fix spacing to appease tests/daemon-conf, which is still in -maint branch)
-
由 Daniel P. Berrange 提交于
When you try to connect to a socket in the abstract namespace, the error will be ECONNREFUSED for a non-listening daemon. With the non-abstract namespace though, you instead get ENOENT. Add a check for this extra errno when auto-spawning the daemon Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 54c4d9d9)
-
由 Daniel P. Berrange 提交于
Remove a number of pointless checks against PATH_MAX and add a syntax-check rule to prevent its use in future Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit ebbcc026)
-
由 Jim Meyering 提交于
* configure.ac (AM_PROG_CC_STDC): Stop using this macro. It provokes warnings from newer automake and is superseded by autoconf's AC_PROG_CC, which we're already using. (cherry picked from commit 0d07aa51)
-
由 Daniel P. Berrange 提交于
Add a note about setting the LIBVIRT_DRIVER_DIR env variable, explain --system and fix example to use --disable-werror (cherry picked from commit 4878a331)
-
由 Eric Blake 提交于
* tests/Makefile.am (valgrind): Use libtool's ability to bypass libtool wrappers when running valgrind. (cherry picked from commit 428fc2bf)
-
If vdsm is installed and configured in Fedora 17, we add the following items into qemu.conf: spice_tls=1 spice_tls_x509_cert_dir="/etc/pki/vdsm/libvirt-spice" However, after this changes, augtool cannot identify qemu.conf anymore. (cherry picked from commit cdd762e4)
-
由 Eric Blake 提交于
With the switch to modules by default, I was getting super long test output: TEST: /home/remote/eblake/libvirt/tests/.libs/lt-interfacexml2xmltest compared to the former: TEST: interfacexml2xmltest * tests/testutils.c (virtTestMain): Trim off libtool goop. (cherry picked from commit ee407255)
-
由 Daniel P. Berrange 提交于
The apibuild.py parser needs to be able to parse & ignore any VIR_ENUM_IMPL/VIR_ENUM_DECL macros in the source. Add some special case code to deal with this rather than trying to figure out a generic syntax for parsing macros. * apibuild.py: Special case VIR_ENUM_IMPL & VIR_ENUM_DECL (cherry picked from commit 45b43a8c)
-