- 07 6月, 2011 2 次提交
-
-
由 Osier Yang 提交于
-
由 Matthias Bolte 提交于
virGetVersion itself doesn't take a virConnectPtr, but in order to obtain the hypervisor version against which libvirt was compiled it is used in combination with virConnectGetType like this: hvType = virConnectGetType(conn) virGetVersion(&libVer, hvType, &typeVer) When virConnectGetType is called on a remote connection then the remote driver returns the type of the underlying driver on the server side, for example QEMU. Then virGetVersion compares hvType to a set of strings that depend on configure options and returns LIBVIR_VERSION_NUMBER in most cases. Now this fails in case libvirt on the client side is just compiled with the remote driver enabled only and the server side has the actual driver such as the QEMU driver. It just happens to work when the actual driver is enabled on client and server side. But that's not always true. I noticed this on FreeBSD: freebsd# virsh -c qemu+tcp://192.168.178.22/system version Compiled against library: libvir 0.9.2 error: failed to get the library version error: this function is not supported by the connection driver: virGetVersion This is not FreeBSD specific, happens on Windows as well due to the similar driver support configuration. The problem is that virConnectGetType returns QEMU, but virGetVersion on the client side only accepts Remote as hvType due to all other drivers being disabled on the client side. Daniel P. Berrange suggested to get rid of all the conditional code in virGetVersion, ignoring the hvType and always setting typeVer to LIBVIR_VERSION_NUMBER. virConnectGetVersion is supposed to be used to obtain the hypervisor version.
-
- 06 6月, 2011 4 次提交
-
-
由 Matthias Bolte 提交于
Annotate the ESX device driver dummy. Refactor the udev and hal device driver strcuts to match the common annotation pattern.
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: update for release * po/*.po*: updated translations and regenerated
-
由 Matthias Bolte 提交于
Change the driver comments for proper extraction and values by the scripts used for documentation
-
由 Daniel P. Berrange 提交于
When peer-2-peer migration was invoked by a client supporting v3, but where the target server only supported v2, we'd not correctly shutdown the guest. * src/qemu/qemu_migration.c: Ensure guest is shutdown in v2 peer 2 peer migration
-
- 05 6月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 04 6月, 2011 7 次提交
-
-
由 Daniel P. Berrange 提交于
The v2 migration protocol doesn't use cookies, so we should not be raising an error if the cookie parameters are NULL. * src/qemu/qemu_migration.c: Don't raise error if cookie is NULL
-
由 Daniel P. Berrange 提交于
The error code for virKillProcess is returned in the errno variable not the return value. THis mistake caused the logs to be filled with errors when shutting down QEMU processes * src/qemu/qemu_process.c: Fix process kill check.
-
由 Matthias Bolte 提交于
VirtualBox 4.0.8 changed the registry key layout. Before the version number was in a Version key. Now the Version key contains %VER% and the actual version number is in VersionExt now. Move value lookup code into its own function: vboxLookupRegistryValue.
-
由 Eric Blake 提交于
This commit is safe precisely because there has been no release for any of the enum values being deleted (they were added post-0.9.1). After the 0.9.2 release, we can then take advantage of virDomainModificationImpact in more places. * include/libvirt/libvirt.h.in (virDomainModificationImpact): New enum. (virDomainSchedParameterFlags, virMemoryParamFlags): Delete, since these were never released, and the new enum works fine here. * src/libvirt.c (virDomainGetMemoryParameters) (virDomainSetMemoryParameters) (virDomainGetSchedulerParametersFlags) (virDomainSetSchedulerParametersFlags): Update documentation. * src/qemu/qemu_driver.c (qemuDomainSetMemoryParameters) (qemuDomainGetMemoryParameters, qemuSetSchedulerParametersFlags) (qemuSetSchedulerParameters, qemuGetSchedulerParametersFlags) (qemuGetSchedulerParameters): Adjust clients. * tools/virsh.c (cmdSchedinfo, cmdMemtune): Likewise. Based on ideas by Daniel Veillard and Hu Tao.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
-
由 Laine Stump 提交于
This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=702044 https://bugzilla.redhat.com/show_bug.cgi?id=709454 Both of these complain of a failure to use an image file that resides on a read-only NFS volume. The function in the DAC security driver that chowns image files to the qemu user:group before using them already has special cases to ignore failure of chown on read-only file systems, and in a few other cases, but it hadn't been checking for EINVAL, which is what is returned if the qemu user doesn't even exist on the NFS server. Since the explanation of EINVAL in the chown man page almost exactly matches the log message already present for the case of EOPNOTSUPP, I've just added EINVAL to that same conditional.
-
- 03 6月, 2011 24 次提交
-
-
由 Matthias Bolte 提交于
This fixes a build failure on MinGW, due to MinGW not supporting dlopen.
-
由 Neil Wilson 提交于
Signed-off-by: NNeil Wilson <neil@aldur.co.uk>
-
由 Eric Blake 提交于
Coverity couldn't see that priv is NULL on failure. But on failure, we might as well guarantee that callers don't try to free uninitialized memory. * src/remote/remote_driver.c (remoteGenericOpen): Even on failure, pass priv back to caller.
-
由 Eric Blake 提交于
Coverity complained that infd could be -1 at the point where it is passed to write, when in reality, this code can only be reached if infd is non-negative. * src/util/command.c (virCommandProcessIO): Help out coverity.
-
由 Eric Blake 提交于
Detected by Coverity. Bug introduced in 08106e20 (unreleased). * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): Use correct sizeof operand.
-
由 Eric Blake 提交于
Detected by Coverity. Introduced in commit aaf2b70b, and turned into a regression in the next few commits through 4e6e6672 (unreleased). * src/conf/domain_event.c (virDomainEventStateFree): Free object, per documentation.
-
由 Eric Blake 提交于
Detected by Coverity. This leaked a cpumap on every iteration of the loop. Leak introduced in commit 1cc4d025 (v0.9.0). * src/qemu/qemu_process.c (qemuProcessSetVcpuAffinites): Plug leak, and hoist allocation outside loop.
-
由 Eric Blake 提交于
Detected by Coverity. Only possible in OOM situations. * daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak.
-
由 Eric Blake 提交于
Detected by Coverity. Only possible on OOM situations. * src/locking/lock_manager.c (virLockManagerPluginNew): Plug leak.
-
由 Eric Blake 提交于
Spotted by coverity. Triggers on failed stat, although I'm not sure how easy that condition is, so I'm not sure if this is a runtime memory hog. Regression introduced in commit 8077d64f (unreleased). * src/util/storage_file.c (virStorageFileGetMetadataFromFD): Reduce need for malloc, avoiding a leak.
-
由 Eric Blake 提交于
Coverity detected that options was being set by strdup but never freed. But why even bother with an options variable? The options parameter never changes! Leak present since commit 44948f5b (0.7.0). This function could probably be rewritten to take better advantage of virCommand, but that is more invasive. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemMount): Avoid wasted strdup, and guarantee proper cleanup on all paths.
-
由 Eric Blake 提交于
Spotted by Coverity. Only possible on an OOM condition, so unlikely to bite in the wild. * daemon/libvirtd.c (qemudSetLogging): Don't leak memory.
-
由 Eric Blake 提交于
Detected by Coverity. While it is possible on OOM condition, as well as with bad code that passes binary == NULL, it is unlikely to be encountered in the wild. * src/util/command.c (virCommandNewArgList): Don't leak memory.
-
由 Daniel P. Berrange 提交于
In v3 migration, once migration is completed, the VM needs to be left in a paused state until after Finish3 has been executed on the target. Only then will the VM be killed off. When using non-JSON QEMU monitor though, we don't receive any 'STOP' event from QEMU, so we need to manually set our state offline & thus release lock manager leases. It doesn't hurt to run this on the JSON case too, just in case the event gets lost somehow * src/qemu/qemu_migration.c: Explicitly set VM state to paused when migration completes
-
由 Daniel P. Berrange 提交于
The change 18c2a592 caused some regressions in behaviour of virDomainBlockStats and virDomainBlockInfo in the QEMU driver. The virDomainBlockInfo API stopped working for inactive guests if querying a block device. The virDomainBlockStats API did not promptly report an error if the guest was not running in some cases. * src/qemu/qemu_driver.c: Fix inactive guest handling in BlockStats/Info APIs
-
由 Jim Fehlig 提交于
There were a few minor issues in commit 5b6c961e - leak managed save path - leak managed save fd - functions that open an fd should also close it
-
由 Heath Petersen 提交于
I have been finding that some UML command line networking parameters are being generated incorrectly. For more information, see https://bugzilla.redhat.com/show_bug.cgi?id=706295 .
-
由 Eric Blake 提交于
I intentionally set things up so 'virsh help interface' lists commands in alphabetical order, but 'man virsh' lists them in topical order; this matches our practice on some other commands. * tools/virsh.pod: Document all iface commands. * tools/virsh.c (ifaceCmds): Sort.
-
由 Daniel P. Berrange 提交于
The qemuAuditDisk calls in disk hotunplug operations were being passed 'ret >= 0', but the code which sets ret to 0 was not yet executed, and the error path had already jumped to the 'cleanup' label. This meant hotunplug failures were never audited, and hotunplug success was audited as a failure * src/qemu/qemu_hotplug.c: Fix auditing of hotunplug
-
由 Daniel P. Berrange 提交于
When virLockDriverAcquire is invoked during hotplug the state parameter will be left as NULL. * src/locking/lock_driver_nop.c, src/locking/lock_driver_sanlock.c: Don't reference NULL state parameter
-
由 Daniel P. Berrange 提交于
Refactoring of the lock manager hotplug methods lost the ret = 0 assignment for successful return path * src/locking/domain_lock.c: Add missing ret = 0 assignments
-
由 Daniel P. Berrange 提交于
After successfull virDomainSave/virDomainManagedSave calls the guest will no longer be active, so the domain ID must be reset to -1 * daemon/remote_generator.pl: Special case virDomainSave & virDomainManagedSave for same reason as virDomainDestroy
-
由 Daniel P. Berrange 提交于
Commit 4454a9ef introduced bad behaviour on the VIR_EVENT_HANDLE_ERROR condition. This condition is only hit when an invalid FD is used in poll() (typically due to a double-close bug). The QEMU monitor code was treating this condition as non-fatal, and thus libvirt would poll() in a fast loop forever burning 100% CPU. VIR_EVENT_HANDLE_ERROR must be handled in the same way as VIR_EVENT_HANDLE_HANGUP, killing the QEMU instance. * src/qemu/qemu_monitor.c: Treat VIR_EVENT_HANDLE_ERROR as EOF
-
由 Daniel P. Berrange 提交于
In between fork and exec, a connection to sanlock is acquired and the socket file descriptor is intionally leaked to the child process. sanlock watches this FD for POLL_HANGUP to detect when QEMU has exited. We don't want a rogus/compromised QEMU from issuing sanlock RPC calls on the leaked FD though, since that could be used to DOS other guests. By calling sanlock_restrict() on the socket before exec() we can lock it down. * configure.ac: Check for sanlock_restrict API * src/locking/domain_lock.c: Restrict lock acquired in process startup phase * src/locking/lock_driver.h: Add VIR_LOCK_MANAGER_ACQUIRE_RESTRICT * src/locking/lock_driver_sanlock.c: Add call to sanlock_restrict when requested by VIR_LOCK_MANAGER_ACQUIRE_RESTRICT flag
-
- 02 6月, 2011 2 次提交
-
-
由 Eric Blake 提交于
Partial revert of commit c3c30d4d. * docs/Makefile.am (internals/%.html.tmp): Restore MKDIR_P; it is needed for intermediate file after all. Reported by Daniel P. Berrange.
-
由 Michal Privoznik 提交于
* tools/virsh.c: Add screenshot command * tools/virsh.pod: Document new command * src/libvirt.c: Fix off-be-one error
-