- 13 8月, 2012 29 次提交
-
-
由 Stefan Berger 提交于
Below patch fixes this coverity report: /libvirt/src/conf/nwfilter_conf.c:382: leaked_storage: Variable "varAccess" going out of scope leaks the storage it points to. (cherry picked from commit b1675bac)
-
由 Eiichi Tsukata 提交于
Hello, This is a patch to fix vm's outbound traffic control problem. Currently, vm's outbound traffic control by libvirt doesn't go well. This problem was previously discussed at libvir-list ML, however it seems that there isn't still any answer to the problem. http://www.redhat.com/archives/libvir-list/2011-August/msg00333.html I measured Guest(with virtio-net) to Host TCP throughput with the command "netperf -H". Here are the outbound QoS parameters and the results. outbound average rate[kilobytes/s] : Guest to Host throughput[Mbit/s] ====================================================================== 1024 (8Mbit/s) : 4.56 2048 (16Mbit/s) : 3.29 4096 (32Mbit/s) : 3.35 8192 (64Mbit/s) : 3.95 16384 (128Mbit/s) : 4.08 32768 (256Mbit/s) : 3.94 65536 (512Mbit/s) : 3.23 The outbound traffic goes down unreasonably and is even not controled. The cause of this problem is too large mtu value in "tc filter" command run by libvirt. The command uses burst value to set mtu and the burst is equal to average rate value if it's not set. This value is too large. For example if the average rate is set to 1024 kilobytes/s, the mtu value is set to 1024 kilobytes. That's too large compared to the size of network packets. Here libvirt applies tc ingress filter to Host's vnet(tun) device. Tc ingress filter is implemented with TBF(Token Buckets Filter) algorithm. TBF uses mtu value to calculate the amount of token consumed by each packet. With too large mtu value, the token consumption rate is set too large. This leads to token starvation and deterioration of TCP throughput. Then, should we use the default mtu value 2 kilobytes? The anser is No, because Guest with virtio-net device uses 65536 bytes as mtu to transmit packets to Host, and the tc filter with the default mtu value 2k drops packets whose size is larger than 2k. So, the most packets is droped and again leads to deterioration of TCP throughput. The appropriate mtu value is 65536 bytes which is equal to the maximum value of network interface device defined in <linux/netdevice.h>. The value is not so large that it causes token starvation and not so small that it drops most packets. Therefore this patch set the mtu value to 64kb(== 65535 bytes). Again, here are the outbound QoS parameters and the TCP throughput with the libvirt patched. outbound average rate[kilobytes/s] : Guest to Host throughput[Mbit/s] ====================================================================== 1024 (8Mbit/s) : 8.22 2048 (16Mbit/s) : 16.42 4096 (32Mbit/s) : 32.93 8192 (64Mbit/s) : 66.85 16384 (128Mbit/s) : 133.88 32768 (256Mbit/s) : 271.01 65536 (512Mbit/s) : 547.32 The outbound traffic conforms to the given limit. Thank you, Signed-off-by: NEiichi Tsukata <eiichi.tsukata.xh@hitachi.com> (cherry picked from commit 0ac3baee) Conflicts: AUTHORS
-
由 Peter Krempa 提交于
If the user specified invalid protocol type in a network's SRV record the error path ended up in freeing uninitialized pointers causing a daemon crash. *network_conf.c: virNetworkDNSSrvDefParseXML(): initialize local variables (cherry picked from commit 96ebb4fe)
-
由 Osier Yang 提交于
mnt_fsname can not be the same, as we check the duplicate pool sources earlier before, means it can't be the same pool, moreover, a pool can't be started if it's already active anyway. So no reason to act as success. (cherry picked from commit 81165294)
-
由 Marc-André Lureau 提交于
Pushed without ack, under the trivial rule. (cherry picked from commit b29f9bbe)
-
由 Michal Privoznik 提交于
virConnectDomainEventRegisterAny() takes a domain as an argument. So it should be possible to register the same event (be it VIR_DOMAIN_EVENT_ID_LIFECYCLE for example) for two different domains. That is, we need to take domain into account when searching for duplicate event being already registered. (cherry picked from commit cd15303f)
-
由 Christophe Fergeau 提交于
(cherry picked from commit 0b7ad22b)
-
由 Guido Günther 提交于
since it's an autogenerated file (cherry picked from commit 16a8f5e5)
-
由 Guido Günther 提交于
since they aren't. Detected by Debian's lintian. (cherry picked from commit 78bf84f4)
-
由 Thang Pham 提交于
Minimal CPU "parser" for s390 to avoid compile time warning. Signed-off-by: NThang Pham <thang.pham@us.ibm.com> Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com> (cherry picked from commit bf2e40fa) (crobinso: Add Thang to AUTHORS)
-
由 Viktor Mihajlovski 提交于
Starting a KVM guest on s390 fails immediately. This is because "qemu --help" reports -no-acpi even for the s390(x) architecture but -no-acpi isn't supported there. Workaround is to remove QEMU_CAPS_NO_ACPI from the capability set after the version/capability extraction. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com> (cherry picked from commit 6a6c3471) (crobinso: add Viktor to AUTHORS)
-
由 Osier Yang 提交于
"cannot set memory of an active domain" is misleading, it sounds like setting memory of active domain is not supported. (cherry picked from commit 968b6c60)
-
由 Peter Krempa 提交于
This patch adds a check for the count of processors the user requests for the guest machine so that invalid values produce a more helpful error message. (cherry picked from commit de924ca9)
-
由 Jim Fehlig 提交于
The lxc contoller eventually makes use of virRandomBits(), which was segfaulting since virRandomInitialize() is never invoked. Program received signal SIGSEGV, Segmentation fault. 0x00007ffff554d560 in random_r () from /lib64/libc.so.6 (gdb) bt 0 0x00007ffff554d560 in random_r () from /lib64/libc.so.6 1 0x0000000000469eaa in virRandomBits (nbits=32) at util/virrandom.c:80 2 0x000000000045bf69 in virHashCreateFull (size=256, dataFree=0x4aa2a2 <hashDataFree>, keyCode=0x45bd40 <virHashStrCode>, keyEqual=0x45bdad <virHashStrEqual>, keyCopy=0x45bdfa <virHashStrCopy>, keyFree=0x45be37 <virHashStrFree>) at util/virhash.c:134 3 0x000000000045c069 in virHashCreate (size=0, dataFree=0x4aa2a2 <hashDataFree>) at util/virhash.c:164 4 0x00000000004aa562 in virNWFilterHashTableCreate (n=0) at conf/nwfilter_params.c:686 5 0x00000000004aa95b in virNWFilterParseParamAttributes (cur=0x711d30) at conf/nwfilter_params.c:793 6 0x0000000000481a7f in virDomainNetDefParseXML (caps=0x702c90, node=0x7116b0, ctxt=0x7101b0, bootMap=0x0, flags=0) at conf/domain_conf.c:4589 7 0x000000000048cc36 in virDomainDefParseXML (caps=0x702c90, xml=0x710040, root=0x7103b0, ctxt=0x7101b0, expectedVirtTypes=16, flags=0) at conf/domain_conf.c:8658 8 0x000000000048f011 in virDomainDefParseNode (caps=0x702c90, xml=0x710040, root=0x7103b0, expectedVirtTypes=16, flags=0) at conf/domain_conf.c:9360 9 0x000000000048ee30 in virDomainDefParse (xmlStr=0x0, filename=0x702ae0 "/var/run/libvirt/lxc/x.xml", caps=0x702c90, expectedVirtTypes=16, flags=0) at conf/domain_conf.c:9310 10 0x000000000048ef00 in virDomainDefParseFile (caps=0x702c90, filename=0x702ae0 "/var/run/libvirt/lxc/x.xml", expectedVirtTypes=16, flags=0) at conf/domain_conf.c:9332 11 0x0000000000425053 in main (argc=5, argv=0x7fffffffe2b8) at lxc/lxc_controller.c:1773 (cherry picked from commit 57349ffc)
-
由 Guido Günther 提交于
since int is 4 bytes on both i386 and amd64. (cherry picked from commit 229773fc)
-
由 Dipankar Sarma 提交于
Fix the default usb controller for pseries systems if none specified. Signed-off-by: NDipankar Sarma <dipankar@in.ibm.com> (cherry picked from commit d1778b71)
-
由 Martin Kletzander 提交于
virsh help fix: - <--title> can also /get/ the title virsh man page: - missing <domain-id> - <new_desc> should be <new-desc> (cherry picked from commit 3dc733bb)
-
由 Martin Kletzander 提交于
Until now, it was possible to crash libvirtd when defining domain with channel device with missing source element. When creating new virDomainChrDef, target.port is set to -1, but unfortunately it is an union with addresses that virDomainChrDefFree tries to free in case the deviceType is channel. Having the port set to -1 is intended, however the cleanest way to get around the problems with the crash seems to be renumbering the VIR_DOMAIN_CHR_CHANNEL_ target types to cover new NONE type (with value 0) being the default (no target type yet). (cherry picked from commit 830d035f)
-
由 Martin Kletzander 提交于
Append '(MAC Address)' after the help string of domiftune virsh command as it takes the same type of argument as domif-{get,set}link which have it specified. (cherry picked from commit 4b227307)
-
由 Guido Günther 提交于
The word size there is 64 bit not 8. (cherry picked from commit 7dcee3f9)
-
由 Gao feng 提交于
we alloc the memory for format in lxcContainerMountDetectFilesystem but without free it in lxcContainerMountFSBlockHelper. this patch just call VIR_FREE to free it. Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com> (cherry picked from commit 73e2d646)
-
由 Michal Privoznik 提交于
With latest changes to qemu-ga success on some commands is not reported anymore, e.g. guest-shutdown or guest-suspend-*. However, errors are still being reported. Therefore, we need to find different source of indication if operation was successful. Events. (cherry picked from commit d97a234c)
-
由 Eric Blake 提交于
Commit 6e769eba made it a runtime error if libvirt was compiled without yajl support but targets a new enough qemu. But enough users are hitting this on self-compiled libvirt that it is worth erroring out at compilation time, rather than an obscure failure when trying to use the built executable. * configure.ac: If qemu is requested and -version works, require yajl when qemu version is new enough. * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Add comment. (cherry picked from commit 350583c8)
-
由 Cole Robinson 提交于
If we do ./autogen.sh && ./configure, then later try ./autogen.sh --system, configure isn't invoked with the requested params. Instead config.status --recheck is run. (cherry picked from commit 2cd29c31)
-
由 Jim Fehlig 提交于
The return status of virInterfaceDefParseBridge() was not being checked, potentially resulting in the creation of a broken interface. (cherry picked from commit cc004a66)
-
由 Osier Yang 提交于
'boot' tag shouldn't be exclusive with 'kernel', 'initrd', and 'cmdline', though the boot sequence doesn't make sense when the guest boots from kernel directly. But it's useful if booting from kernel is to install a newguest, even if it's not to install a guest, there is no hurt. And on the other hand, we allow 'boot' and the kernel tags when parsing. (cherry picked from commit b34324fb)
-
由 Wen Congyang 提交于
If we lock the qemu_driver, we should call qemuDomainObjBeginJobWithDriver() not qemuDomainObjBeginJob(). (cherry picked from commit 5136c579)
-
由 Osier Yang 提交于
Detected by valgrind: ==16217== 1 errors in context 1 of 12: ==16217== Invalid read of size 1 ==16217== at 0x4A07804: __GI_strlen (mc_replace_strmem.c:284) ==16217== by 0x3019F167F6: xdr_string (in /lib64/libc-2.12.so) ==16217== by 0x3033709E8D: xdr_remote_nonnull_string (remote_protocol.c:31) ==16217== by 0x303370E5CB: xdr_remote_domain_update_device_flags_args (remote_protocol.c:2028) ==16217== by 0x30337197D1: virNetMessageEncodePayload (virnetmessage.c:341) ==16217== by 0x30337135E1: virNetClientProgramCall (virnetclientprogram.c:327) ==16217== by 0x30336F1EFD: callWithFD (remote_driver.c:4586) ==16217== by 0x30336F1F7B: call (remote_driver.c:4607) ==16217== by 0x30336F42F2: remoteDomainUpdateDeviceFlags (remote_client_bodies.h:2865) ==16217== by 0x30336D46E5: virDomainUpdateDeviceFlags (libvirt.c:9457) ==16217== by 0x41AEE8: cmdChangeMedia (virsh.c:15249) ==16217== by 0x413CB4: vshCommandRun (virsh.c:18669) ==16217== Address 0x4ec5e25 is 0 bytes after a block of size 293 alloc'd ==16217== at 0x4A04A28: calloc (vg_replace_malloc.c:467) ==16217== by 0x303364F1DB: virAllocN (memory.c:129) ==16217== by 0x41A844: vshPrepareDiskXML (virsh.c:15043) ==16217== by 0x41AECC: cmdChangeMedia (virsh.c:15246) ==16217== by 0x413CB4: vshCommandRun (virsh.c:18669) ==16217== by 0x423973: main (virsh.c:20261) (cherry picked from commit e3843d7f)
-
由 Laine Stump 提交于
(cherry picked from commit 8b36e32c)
-
- 12 8月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
The public libvirt API does not have any application visible dependency on Xen libraries. The xen-devel dependency is thus bogus (cherry picked from commit 899bf668) Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This reverts commit d8978c90. Not suitable for -maint without backporting a feature as well, according to Jim's post here: http://www.mail-archive.com/libvir-list@redhat.com/msg57781.html
-
- 02 8月, 2012 1 次提交
-
-
由 Jiri Denemark 提交于
CVE-2012-3445, https://bugzilla.redhat.com/show_bug.cgi?id=844745 Daemon uses the following pattern when dispatching APIs with typed parameters: VIR_ALLOC_N(params, nparams); virDomain*(dom, params, &nparams, flags); virTypedParameterArrayClear(params, nparams); In case nparams was originally set to 0, virDomain* API would fill it with the number of typed parameters it can provide and we would use this number (rather than zero) to clear params. Because VIR_ALLOC* returns non-NULL pointer even if size is 0, the code would end up walking through random memory. If we were lucky enough and the memory contained 7 (VIR_TYPED_PARAM_STRING) at the right place, we would try to free a random pointer and crash. Let's make sure params stays NULL when nparams is 0. (cherry picked from commit 6039a2cb)
-
- 28 7月, 2012 4 次提交
-
-
由 Gerd v. Egidy 提交于
I originally postet this into the Fedora bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=843836 Currently gracefully shutting down guest vms on host shutdown does not work on Fedora 17, the guests are killed hard on system shutdown. The reason is systemd considers libvirt-guests.service to be stopped when the system is running: $ systemctl status libvirt-guests.service libvirt-guests.service - Suspend Active Libvirt Guests Loaded: loaded (/usr/lib/systemd/system/libvirt-guests.service; enabled) Active: deactivating (stop) since Fri, 27 Jul 2012 15:47:31 +0200; 2min 48s ago Process: 1085 ExecStart=/etc/init.d/libvirt-guests start (code=exited, status=0/SUCCESS) Control: 1150 (libvirt-guests) CGroup: name=systemd:/system/libvirt-guests.service └ control ├ 1150 /bin/sh /etc/init.d/libvirt-guests stop └ 2257 sleep 1 libvirt-guests.service is defined as type "simple" in systemd (the default). That means systemd will shut down the service when the start executable is terminated after starting is done. Systemd will not call stop again on system shutdown because it thinks it is already stopped. The solution is to define it as type "oneshot" and set the flag "RemainAfterExit". Then systemd will consider the service as active after startup and will call the stop function on host shutdown. (cherry picked from commit 79ca7e4e)
-
由 Eric Blake 提交于
Pick up some build fixes in the latest gnulib. In particular, we want to ensure that official tarballs are secure, but don't want to penalize people who don't run 'make dist', since fixed automake still hasn't hit common platforms like Fedora 17. * .gnulib: Update to latest, for Automake CVE-2012-3386 detection. * bootstrap: Resync from gnulib. * bootstrap.conf (gnulib_extra_files): Drop missing, since gnulib has dropped it in favor of Automake's version. * cfg.mk (local-checks-to-skip): Conditionally skip the security check in cases where it doesn't matter. (cherry picked from commit f12e1396)
-
由 Daniel P. Berrange 提交于
On both x86_64-w64-mingw32 and i686-w64-mingw32 there were the following warnings/errors: CC fstat.lo ../../../gnulib/lib/fstat.c:27:0: warning: "stat" redefined [enabled by default] In file included from ./sys/stat.h:32:0, from ../../../gnulib/lib/fstat.c:25: /usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/stat.h:258:0: note: this is the location of the previous definition ../../../gnulib/lib/fstat.c:28:0: warning: "fstat" redefined [enabled by default] In file included from ./sys/stat.h:32:0, from ../../../gnulib/lib/fstat.c:25: /usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/stat.h:259:0: note: this is the location of the previous definition CC stat.lo ../../../gnulib/lib/stat.c:32:0: warning: "stat" redefined [enabled by default] In file included from ./sys/stat.h:32:0, from ../../../gnulib/lib/stat.c:27: /usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/stat.h:258:0: note: this is the location of the previous definition CC stdio-read.lo ../../../gnulib/lib/stdio-read.c:102:1: error: redefinition of 'vscanf' In file included from ./stdio.h:43:0, from ../../../gnulib/lib/stdio-read.c:21: /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:397:7: note: previous definition of 'vscanf' was here ../../../gnulib/lib/stdio-read.c:108:1: error: redefinition of 'vfscanf' In file included from ./stdio.h:43:0, from ../../../gnulib/lib/stdio-read.c:21: /usr/x86_64-w64-mingw32/sys-root/mingw/include/stdio.h:384:7: note: previous definition of 'vfscanf' was here make[3]: *** [stdio-read.lo] Error 1 make[3]: Leaving directory `/home/berrange/src/virt/libvirt/build/gnulib/lib' While on x86_64-w64-mingw32 only there was: In file included from ../../../gnulib/lib/regex.c:69:0: ../../../gnulib/lib/regcomp.c: In function 'parse_dup_op': ../../../gnulib/lib/regcomp.c:2624:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] ../../../gnulib/lib/regcomp.c: In function 'mark_opt_subexp': ../../../gnulib/lib/regcomp.c:3859:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit db835b7b)
-
由 Eric Blake 提交于
Gnulib finally relaxed the isatty license, needed as first mentioned here: https://www.redhat.com/archives/libvir-list/2012-February/msg01022.html Other improvements include better syntax-check rules (we can delete one of ours now that it is a duplicate) and better compiler warning usage. * .gnulib: Update to latest, for isatty. * cfg.mk (sc_prohibit_strncpy): Drop a now-redundant rule. * bootstrap.conf (gnulib_modules): Add isatty. * bootstrap: Resync from gnulib. (cherry picked from commit e925ea31)
-
- 16 6月, 2012 2 次提交
-
-
由 Cole Robinson 提交于
-
由 Eric Blake 提交于
Commit 7bff56a0 worked in an incremental build, but fails for a fresh clone; apparently, if make sees both an actual file spelling and an inference rule, only the exact spelling is used. CCLD libvirt_driver_test.la CC libvirt_driver_remote_la-remote_driver.lo remote/remote_driver.c:4707:34: fatal error: remote_client_bodies.h: No such file or directory compilation terminated. BUILT_SOURCES to the rescue, instead of trying to mess with .lo dependencies directly. * src/Makefile.am (REMOTE_DRIVER_PREREQS, %remote_driver.lo): Drop... (BUILT_SOURCES): ...and add here instead. (cherry picked from commit ca02b101) Conflicts: src/Makefile.am
-
- 15 6月, 2012 2 次提交
-
-
由 Eric Blake 提交于
We had a distributed file (remote_protocol.h, which in turn was a prereq to remote_driver.c) depending on a generated file (libvirt_probes.h), which is a no-no for a VPATH build from a read-only source tree (no wonder 'make distcheck' tests precisely that situation): File `libvirt_driver_remote.la' does not exist. File `libvirt_driver_remote_la-remote_driver.lo' does not exist. Prerequisite `libvirt_probes.h' is newer than target `../../src/remote/remote_protocol.h'. Must remake target `../../src/remote/remote_protocol.h'. Invoking recipe from Makefile:7464 to update target `../../src/remote/remote_protocol.h'. make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/libvirt-0.9.12/_build/src' GEN ../../src/remote/remote_protocol.h cannot create ../../src/remote/remote_protocol.h: Permission denied at ../../src/rpc/genprotocol.pl line 31. make[3]: *** [../../src/remote/remote_protocol.h] Error 13 Rather than making distributed .c files depend on generated files, we really want to ensure that compilation into .lo files is not attempted until the generated files are present, done by this patch. Since there were two different sets of conditionally generated files that both feed the .lo file, I had to introduce a new variable REMOTE_DRIVER_PREREQS to keep automake happy. After that fix, the next issue was that make treats './foo' and 'foo' differently in determining whether an implicit %foo rule is applicable, with the result that locking/qemu-sanlock.conf wasn't properly being built at the right times. Also, the output for using the .aug test files was a bit verbose. After fixing the src directory, the next error is related to the docs directory, where the tarball is missing a stamp file and thus tries to regenerate files that are already present: GEN ../../docs/apibuild.py.stamp Traceback (most recent call last): File "../../docs/apibuild.py", line 2511, in <module> rebuild("libvirt") File "../../docs/apibuild.py", line 2495, in rebuild builder.serialize() File "../../docs/apibuild.py", line 2424, in serialize output = open(filename, "w") IOError: [Errno 13] Permission denied: '../../docs/libvirt-api.xml' make[5]: *** [../../docs/apibuild.py.stamp] Error 1 and fixing that exposed another case of a distributed file (generated html) depending on a built file (libvirt.h), but only when doing an in-tree build, because of a file glob. * src/Makefile.am ($(srcdir)/remote/remote_driver.c): Change... (libvirt_driver_remote_la-remote_driver.lo): ...to the real dependency. ($(builddir)/locking/%-sanlock.conf): Drop $(builddir), so that rule gets run in time for test_libvirt_sanlock.aug. (test_libvir*.aug): Cater to silent build. (conf_DATA): Don't ship qemu-sanlock.conf in the tarball, since it is trivial to regenerate. * docs/Makefile.am (EXTRA_DIST): Ship our stamp file. ($(APIBUILD_STAMP)): Don't depend on generated file. (cherry picked from commit 7bff56a0) Conflicts: src/Makefile.am
-
由 Eric Blake 提交于
'make dist' was depending on *protocol-structs files, which are stored in git but in turn depended on generated files. We still want to ship the protocol-structs files, but by renaming the tests to something not matching a file name, we separate 'make check' (which depends on the generated file) from 'make dist' (which only depends on the git files). After all, the tarball should never depend on a generated file not stored in git. I found one more case of a git file depending on a generated file, in a bogus virkeycode.c listing; but at least this one had no associated rules so it never broke 'make dist'. Reported by Wen Congyang. Latent bug has been present since commit 62dee6fa, but only recently exposed by commit 7bff56a0. * src/Makefile.am ($(srcdir)/util/virkeycode.c): Drop useless dependency. (BUILT_SOURCES): ...and build virkeymaps.h sooner. (PROTOCOL_STRUCTS): Rather than depend on the struct file... (check-local): ...convert things into a phony target of... (check-protocol): ...a new check. ($(srcdir)/remote_protocol-struct): Rename to isolate the distributed file from the conditional test. (PDWTAGS): Deal with rename. Swap to compare 'expected actual'. (cherry picked from commit 9b5970c6)
-