- 18 3月, 2011 8 次提交
-
-
由 Daniel Veillard 提交于
As pointed out, locking the buffer from the signal handler cannot been guaranteed to be safe, so to avoid any hazard we prefer the trade off of dumping logs possibly messed up by concurrent logging activity rather than risk a daemon crash. * src/util/logging.c: change virLogEmergencyDumpAll() to not take any lock on the log buffer but reset buffer content variables to an empty set before starting the actual dump.
-
由 Wen Congyang 提交于
Steps to reproduce this bug: # virsh qemu-monitor-command domain 'cpu_set 2 online' --hmp The domain has 2 cpus, and we try to set the third cpu online. The qemu crashes, and this command will hang. The reason is that the refs is not 1 when we unwatch the monitor. We lock the monitor, but we do not unlock it. So virCondWait() will be blocked. Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
由 Hu Tao 提交于
-
由 Hu Tao 提交于
Make virDomainObjParseNode() static since it is called only in one file.
-
由 Nikunj A. Dadhania 提交于
* Correct the documentation for cgroup: the swap_hard_limit indicates mem+swap_hard_limit. * Change cgroup private apis to: virCgroupGet/SetMemSwapHardLimit Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
-
由 Alex Williamson 提交于
I'm proposing we make use of $PCIDIR/reset in qemu-kvm to reset devices on VM reset. We need to add it to libvirt's list of files that get ownership for device assignment. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
-
由 Jim Fehlig 提交于
xen-unstable c/s 21118:28e5409e3fb3 bumped sysctl version to 8. xen-unstable c/s 21212:de94884a669c introduced CPU pools feature, adding another member to xen_domctl_getdomaininfo struct. Add a corresponding domctl v7 struct in xen hypervisor sub-driver and detect sysctl v8 during initialization.
-
由 Matthias Bolte 提交于
The virCond of the remote_thread_call struct was leaked in some places. This results in leaking the underlying mutex. Which in turn leaks a handle on Windows. Reported by Aliaksandr Chabatar and Ihar Smertsin.
-
- 17 3月, 2011 2 次提交
-
-
由 Eric Blake 提交于
When building for an older distro, it's convenient to just tell rpmbuild to define dist (for example, to .el6_0), rather than also remembering to define rhel to 6. * libvirt.spec.in: Guess %{rhel} based on %{dist}. Based on an idea by Jiri Denemark.
-
由 Laine Stump 提交于
A bug in libnl (see https://bugzilla.redhat.com/show_bug.cgi?id=677724 and https://bugzilla.redhat.com/show_bug.cgi?id=677725) makes it very easy to create a failure to connect to the netlink socket when trying to open a macvtap network device ("type='direct'" in domain interface XML). When that error occurred (during a call to libnl's nl_connect() from libvirt's nlComm(), there was no log message, leading virsh (for example) to report "unknown error". There were two other cases in nlComm where an error in a libnl function might return with failure but no error reported. In all three cases, this patch logs a message which will hopefully be more useful. Note that more detailed information about the failure might be available from libnl's nl_geterror() function, but it calls strerror(), which is not threadsafe, so we can't use it.
-
- 16 3月, 2011 4 次提交
-
-
由 Osier Yang 提交于
If pool xml has no definition for "port", then "Segmentation fault" happens when jumping to "cleanup:" to do "VIR_FREE(port)", as "port" was not initialized in this situation. * src/conf/storage_conf.c
-
由 Eric Blake 提交于
* src/qemu/qemu_monitor.h (qemuMonitorMigrateToFd): New prototype. * src/qemu/qemu_monitor.c (qemuMonitorMigrateToFd): New function.
-
由 Eric Blake 提交于
POSIX states about dd: If the bs=expr operand is specified and no conversions other than sync, noerror, or notrunc are requested, the data returned from each input block shall be written as a separate output block; if the read returns less than a full block and the sync conversion is not specified, the resulting output block shall be the same size as the input block. If the bs=expr operand is not specified, or a conversion other than sync, noerror, or notrunc is requested, the input shall be processed and collected into full-sized output blocks until the end of the input is reached. Since we aren't using conv=sync, there is no zero-padding, but our use of bs= means that a short read results in a short write. If instead we use ibs= and obs=, then short reads are collected and dd only has to do a single write, which can make dd more efficient. * src/qemu/qemu_monitor.c (qemuMonitorMigrateToFile): Avoid 'dd bs=', since it can cause short writes.
-
由 Eric Blake 提交于
"virsh connect ''" should try to connect to the default connection, but the previous patch made it issue a warning about an invalid URI. * tools/virsh.c (VSH_OFLAG_EMPTY_OK): New option flag. (vshCommandOptString): Per the declaration, value is required to be non-NULL. Honor new flag. (opts_connect): Allow empty string connection.
-
- 15 3月, 2011 19 次提交
-
-
由 Wen Congyang 提交于
-
由 Daniel P. Berrange 提交于
The VIR_FROM_RPC error domain is used generically for any RPC problem, not simply XML-RPC problems. * src/util/virterror.c: s/XML-RPC/RPC/
-
由 Daniel P. Berrange 提交于
* configure.ac: Check for geteuid() * src/util/util.h: Compat for geteuid()
-
由 Daniel P. Berrange 提交于
The virCommandNewArgs() method would free the virCommandPtr if it failed to add the args. This meant errors reported in virCommandAddArgSet() were lost. Simply removing the check for errors from the constructor means they can be reported correctly later The virCommandAddEnvPassCommon() method failed to check for errors before reallocating the cmd->env array, causing a potential SEGV if cmd was NULL The virCommandAddArgSet() method needs to validate that at least 1 element in 'val's parameter is non-NULL, otherwise code like cmd = virCommandNew(binary) virCommandAddAtg(cmd, "foo") Would end up trying todo execve("foo"), if binary was NULL.
-
由 Daniel P. Berrange 提交于
The virSetNonBlock() API only allows enabling non-blocking operations. It doesn't allow turning blocking back on. Add a new API to allow arbitrary toggling. * src/libvirt_private.syms, src/util/util.h src/util/util.c: Add virSetBlocking
-
由 Eric Blake 提交于
Fixes bug in commit acacced8 * src/qemu/qemu_command.c (qemuBuildCommandLine): s/INVALID_ARG/CONFIG_UNSUPPORTED/. Reported by Daniel P. Berrange.
-
由 Justin Clift 提交于
-
由 Taku Izumi 提交于
This patch fix a simple bug in virDomainSetMemoryFlags function. The patch sent before lacks the consideration of the case where the driver doesn't support virDomainSetMemoryFlags API. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Daniel P. Berrange 提交于
The current LXC I/O controller looks for HUP to detect when a guest has quit. This isn't reliable as during initial bootup it is possible that 'init' will close the console and let mingetty re-open it. The shutdown of containers was also flakey because it only killed the libvirt I/O controller and expected container processes to gracefully follow. Change the I/O controller such that when it see HUP or an I/O error, it uses kill($PID, 0) to see if the process has really quit. Change the container shutdown sequence to use the virCgroupKillPainfully function to ensure every really goes away This change makes the use of the 'cpu', 'devices' and 'memory' cgroups controllers compulsory with LXC * docs/drvlxc.html.in: Document that certain cgroups controllers are now mandatory * src/lxc/lxc_controller.c: Check if PID is still alive before quitting on I/O error/HUP * src/lxc/lxc_driver.c: Use virCgroupKillPainfully
-
由 Daniel Veillard 提交于
This is the part allowing to dynamically resize the debug log buffer from it's default 64kB size. The buffer is now dynamically allocated. It adds a new API virLogSetBufferSize() which resizes the buffer If passed a zero size, the buffer is deallocated and we do the small optimization of not formatting messages which are not output anymore. On the daemon side, it just adds a new option log_buffer_size to libvirtd.conf and call virLogSetBufferSize() if needed * src/util/logging.h src/util/logging.c src/libvirt_private.syms: make buffer dynamic and add virLogSetBufferSize() internal API * daemon/libvirtd.conf: document the new log_buffer_size option * daemon/libvirtd.c: read and use the new log_buffer_size option
-
由 Eric Blake 提交于
* src/qemu/qemu_monitor_text.h (qemuMonitorTextMigrate): Declare in place of individual monitor commands. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONMigrate): Likewise. * src/qemu/qemu_monitor_text.c (qemuMonitorTextMigrateToHost) (qemuMonitorTextMigrateToCommand, qemuMonitorTextMigrateToFile) (qemuMonitorTextMigrateToUnix): Delete. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONMigrateToHost) (qemuMonitorJSONMigrateToCommand, qemuMonitorJSONMigrateToFile) (qemuMonitorJSONMigrateToUnix): Delete. * src/qemu/qemu_monitor.c (qemuMonitorMigrateToHost) (qemuMonitorMigrateToCommand, qemuMonitorMigrateToFile) (qemuMonitorMigrateToUnix): Consolidate shared code.
-
由 Eric Blake 提交于
Outgoing migration still uses a Unix socket and or exec netcat until the next patch. * src/qemu/qemu_migration.c (qemuMigrationPrepareTunnel): Replace Unix socket with simpler pipe. Suggested by Paolo Bonzini.
-
由 Eric Blake 提交于
Commit 7f193757 renamed libvirt-guests.init from .in to .sh, which made it slip past sc_TAB_in_indentation. I nearly reintroduced a tab, so I'm pushing this to prevent that from happening. * cfg.mk (sc_TAB_in_indentation): Update rule to include .sh files. * .dir-locals.el: List spacing preference for .sh files.
-
由 Osier Yang 提交于
As perhaps other hypervisor drivers use different capacity units, do the checking in qemu driver instead of in conf/domain_conf.c.
-
由 Minoru Usui 提交于
This patch changes zerobuf variable from array to VIR_ALLOC_N(). Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
由 Eric Blake 提交于
* tools/libvirt-guests.init.sh (start, stop, gueststatus): Avoid shell globbing, since valid URIs can contain '?'.
-
由 Philipp Hahn 提交于
At least protect the $uri variable against further expansion by properly quoting it. While doing that, also quote all other variables to protect against shell meta characters. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Philipp Hahn 提交于
Not "Programmable Interrupt Controller" but "Peripheral Component Interconnect". Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Laine Stump 提交于
The newly added call to qemuAuditNetDevice in qemuPhysIfaceConnect was assuming that res_ifname (the name of the macvtap device) was always valid, but this isn't the case. If openMacvtapTap fails, it always returns NULL, which would result in a segv. Since the audit log only needs a record of devices that are actually sent to qemu, and a failure to open the macvtap device means that no device will be sent to qemu, we can solve this problem by only doing the audit if openMacvtapTap is successful (in which case res_ifname is guaranteed valid).
-
- 14 3月, 2011 6 次提交
-
-
由 Michal Privoznik 提交于
in case of incorrect option parsing.
-
由 Laine Stump 提交于
Normally dnsmasq will send a default route (the address of the host in the network definition) to any client requesting an address via DHCP. On an isolated network this makes no sense, as we have iptables to prevent any traffic going out via that interface, so anything sent that way would be dropped anyway. This extra/unusable default route becomes problematic if you have setup a guest with multiple network interfaces, with one connected to an isolated network and another that provides connectivity to the outside (example - one interface directly connecting to a physical interface via macvtap, with a second connected to an isolated network so that the host and guest can communicate (macvtap doesn't support guest<->host communication without an external switch that supports vepa, or reflecting all traffic back)). In this case, if the guest chooses the default route of the isolated network, the guest will not be able to get network traffic beyond the host. To prevent dnsmasq from sending a default route, you can tell it to send 0 bytes of data for the default route option (option number 3) with --dhcp-option=3 (normally the data to send for the option would follow the option number; no extra data means "don't send this option"). I have checked on RHEL5 (a good representative of the oldest supported libvirt platforms) and its version of dnsmasq (2.45) does support --dhcp-option, so this shouldn't create any compatibility problems.
-
由 Jiri Denemark 提交于
This partially reverts (and fixes that part in a different way) commit e4384459, which replaced ``/usr/bin/python'' with ``/usr/bin/env python'' in all examples or scripts used during build to generate other files. However, python bindings module is compiled and linked against a specific python discovered or explicitly provided in configure phase. Thus libvirt.py, which is generated and installed into the system, should use the same python binary for which the module has been built. The hunk in Makefile.am replaces $(srcdir) with $(PYTHON), which might seem wrong but it is not. generator.py didn't use any of its command line arguments so passing $(srcdir) to it was redundant.
-
由 Jiri Denemark 提交于
-
由 Osier Yang 提交于
Otherwise connection of hypervisor driver will be leaked when one shutdown the guest in console. e.g. [root@localhost]# init 0 ...... init: Re-executing /sbin/init Halting system... Power down. error: Failed to disconnect from the hypervisor, 1 leaked reference(s)
-
由 Guido Günther 提交于
As pointed on CVE-2011-1146, some API forgot to check the read-only status of the connection for entry point which modify the state of the system or may lead to a remote execution using user data. The entry points concerned are: - virConnectDomainXMLToNative - virNodeDeviceDettach - virNodeDeviceReAttach - virNodeDeviceReset - virDomainRevertToSnapshot - virDomainSnapshotDelete * src/libvirt.c: fix the above set of entry points to error on read-only connections
-
- 12 3月, 2011 1 次提交
-
-
由 Laine Stump 提交于
By default, all dnsmasq processes share the same leases file. libvirt also uses the --dhcp-lease-max option to control the maximum number of leases allowed. The problem is that libvirt puts in a number equal to the number of addresses in the range for the one network handled by a single instance of dnsmasq, but dnsmasq checks the total number of leases in the file (which could potentially contain many more). The solution is to tell each instance of dnsmasq to create and use its own leases file. (/var/lib/libvirt/network/<net-name>.leases). This file is created by dnsmasq when it starts, but not deleted when it exists. This is fine when the network is just being stopped, but if the leases file was left around when a network was undefined, we could end up with an ever-increasing number of dead files - instead, we explicitly unlink the leases file when a network is undefined. Note that Ubuntu carries a patch against an older version of libvirt for this: hhttps://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/713071 ttp://bazaar.launchpad.net/~serge-hallyn/ubuntu/maverick/libvirt/bugall/revision/109 I was certain I'd also seen discussion of this on libvir-list or libvirt-users, but couldn't find it.
-