- 06 11月, 2013 4 次提交
-
-
由 Laine Stump 提交于
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1020135 If networkAllocateActualDevice() had failed due to a pool of hostdev or direct devices being depleted, the calling function could still call networkReleaseActualDevice() as part of its cleanup, and that function would then unconditionally decrement the connections count for the network, even though it hadn't been incremented (due to failure of allocate). This *was* necessary because the .actual member of the netdef was allocated with a "lazy" algorithm, only being created if there was a need to store data there (e.g. if a device was allocated from a pool, or bandwidth was allocated for the device), so there was no simple way for networkReleaseActualDevice() to tell if something really had been allocated (i.e. if "connections++" had been executed). This patch changes networkAllocateDevice() to *always* allocate an actual device for any netdef of type='network', even if it isn't needed for any other reason. This has no ill effects anywhere else in the code (except for using a small amount of memory), and networkReleaseActualDevice() can then determine if there was a previous successful allocate by checking for .actual != NULL (if not, it skips the "connections--").
-
由 Michal Privoznik 提交于
This addition, however, requires some refactoring to be done. First of all, to match the best practice we should detach the device prior resetting it. That's why testVirPCIDeviceDetach is detaching all devices within 0000:00:01.0 and 0000:00:03.0 range. Then, the brand new test will reset the 0000:00:02.0 device, so the last testVirPCIDeviceReattach can reattach all the devices back. In order to perform a PCI device reset, the dummy config file is not sufficient anymore and must be replaced with real PCI config (binary mess). Such config files are to be stored under tests/virpcitestdata/ and ought to have '.config' suffix. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Guido Günther 提交于
Needed for architectures that don't use gcc atomic ops but pthread. This fixes the armel build that otherwise breaks like: CCLD virt-login-shell ../src/.libs/libvirt-setuid-rpc-client.a(libvirt_setuid_rpc_client_la-virobject.o): In function `virClassNew': /«PKGBUILDDIR»/debian/build/src/../../../src/util/virobject.c:150: undefined reference to `virAtomicLock' ../src/.libs/libvirt-setuid-rpc-client.a(libvirt_setuid_rpc_client_la-virobject.o): In function `virObjectNew': /«PKGBUILDDIR»/debian/build/src/../../../src/util/virobject.c:202: undefined reference to `virAtomicLock' ../src/.libs/libvirt-setuid-rpc-client.a(libvirt_setuid_rpc_client_la-virobject.o): In function `virObjectUnref': /«PKGBUILDDIR»/debian/build/src/../../../src/util/virobject.c:274: undefined reference to `virAtomicLock' ../src/.libs/libvirt-setuid-rpc-client.a(libvirt_setuid_rpc_client_la-virobject.o): In function `virObjectRef': /«PKGBUILDDIR»/debian/build/src/../../../src/util/virobject.c:295: undefined reference to `virAtomicLock' collect2: error: ld returned 1 exit status See https://buildd.debian.org/status/fetch.php?pkg=libvirt&arch=armel&ver=1.1.4-1&stamp=1383588268
-
由 Michal Privoznik 提交于
In the pci_driver_new function it is possible to set a list of <vendor:device> IDs that the driver knows. These IDs are passed as variable arguments and are processed the usual way using va_start() and va_arg(). However, after all arguments has been processed, we should call va_end() what we aren't currently doing. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 11月, 2013 13 次提交
-
-
由 Eric Blake 提交于
A qcow2 file with a backing file of 'gluster://host/vol/file' should not try to look for a directory named './gluster:/' in the file system. * src/util/virstoragefile.c (virBackingStoreIsFile): Broaden check to include all protocols. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Ján Tomko 提交于
Since qemu-kvm 1.1 [1] (since 1.3. in upstream QEMU [2]) '-no-kvm-pit-reinjection' has been deprecated. Use -global kvm-pit.lost_tick_policy=discard instead. https://bugzilla.redhat.com/show_bug.cgi?id=978719 [1] http://git.kernel.org/cgit/virt/kvm/qemu-kvm.git/commit/?id=4e4fa39 [2] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=c21fb4f
-
由 John Ferlan 提交于
Coverity complains that the call to virPCIDeviceDetach() in qemuPrepareHostdevPCIDevices() doesn't check status return like other calls. Seems this just was lurking until a recent change to this module resulted in Coverity looking harder and finding the issue. Introduced by 'a4efb2e3' when function was called 'pciReAttachDevice()' Just added a ignore_value() since it doesn't appear to matter if the call fails since we're on a failure path already.
-
由 Daniel P. Berrange 提交于
Currently the LXC container tries to skip selinux/securityfs mounts if the directory does not exist in the filesystem, or if SELinux is disabled. The former check is flawed because the /sys/fs/selinux or /sys/kernel/securityfs directories may exist in sysfs even if the mount type is disabled. Instead of just doing an access() check, use an virFileIsMounted() to see if the FS is actually present in the host OS. This also avoids the need to check is_selinux_enabled(). Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Some mounts must be skipped if running inside a user namespace, since the kernel forbids their use. Instead of strcmp'ing the filesystem type in the body of the loop, set an explicit flag in the lxcBasicMounts table. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the lxcBasicMounts array has separate entries for most mounts, to reflect that we must do a separate mount operation to make mounts read-only. Remove the duplicate entries and instead set the MS_RDONLY flag against the main entry. Then change lxcContainerMountBasicFS to look for the MS_RDONLY flag, mask it out & do a separate bind mount. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The 'srcpath' variable is initialized from 'mnt->src' and never changed thereafter. Some places continue to use 'mnt->src' and others use 'srcpath'. Remove the pointless 'srcpath' variable and use 'mnt->src' everywhere. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virLXCBasicMountInfo struct contains a 'char *opts' field passed onto the mount() syscall. Every entry in the list sets this to NULL though, so it can be removed to simplify life. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add a function for efficiently checking if a path is a filesystem mount point. NB will not work for bind mounts, only true filesystem mounts. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
This just introduces the test for bug fixed in df4283a5. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1018897 If a PCI deivce is not binded to any driver (e.g. there's yet no PCI driver in the linux kernel) but still users want to passthru the device we fail the whole operation as we fail to resolve the 'driver' link under the PCI device sysfs tree. Obviously, this is not a fatal error and it shouldn't be error at all. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This test will reattach the PCI device detached in the previous test. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This commit introduces yet another test under virpcitest: virPCIDeviceDetach. However, in order to be able to do this, the virpcimock needs to be extended to model the kernel behavior on PCI device binding and unbinding (create 'driver' symlinks under the device tree, check for device ID in driver's ID table, etc.) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 04 11月, 2013 14 次提交
-
-
由 Michal Privoznik 提交于
Among with this test introduce virpcimock as we need to mock some syscalls, e.g. redirect open() of a file under /sys/bus/pci to a stub sysfs tree. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Until now the map was loaded from the XML definition file every time a operation on the flags was requested. With the introduciton of one shot initializers we can store the definition forever (as it will never change) instead of parsing it over and over again.
-
由 Jiri Denemark 提交于
This makes virCPUx86DataAddCPUID, virCPUx86DataFree, and virCPUx86MakeData available for direct usage outside of cpu driver in tests and the new qemu monitor that will request the actual CPU definition from a running qemu instance.
-
由 Peter Krempa 提交于
Now that all libnuma functions used by libvirt are wrapped in virNuma we can remove the dependancy from nodeinfo.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
The function was called in a single place only and was reporting errors that were later ignored. Use the virNumaGetNodeMemory helper to get the size of the memory in the NUMA node and remove the helper
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Avoid necessary checks for the numa library with this helper.
-
由 Peter Krempa 提交于
linuxNodeGetCPUStats() and linuxNodeGetMemoryStats() are static and don't need a forward declaration.
-
由 Peter Krempa 提交于
All functions from libnuma must be protected with ifdefs. Avoid this by using our own wrapper.
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: update for the release * po/*.po*: update localizations from transifex and regenerate
-
由 Ryota Ozaki 提交于
aa0f0992 introduced a strict error checking for getsockopt and it revealed that getting a peer credential of a socket on FreeBSD didn't work. Libvirtd hits the error: error : virNetSocketGetUNIXIdentity:1198 : Failed to get valid client socket identity groups SOL_SOCKET (0xffff) was used as a level of getsockopt for LOCAL_PEERCRED, however, it was wrong. 0 is correct as well as Mac OS X. So for LOCAL_PEERCRED our options are SOL_LOCAL (if defined) or 0 on Mac OS X and FreeBSD. According to the fact, the patch simplifies the code by removing ifdef __APPLE__. I tested the patch on FreeBSD 8.4, 9.2 and 10.0-BETA1. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
- 03 11月, 2013 1 次提交
-
-
由 Doug Goldstein 提交于
With Mac OS X 10.9, xdrproc_t is no longer defined as: typedef bool_t (*xdrproc_t)(XDR *, ...); but instead as: typdef bool_t (*xdrproc_t)(XDR *, void *, unsigned int); For reference, Linux systems typically define it as: typedef bool_t (*xdrproc_t)(XDR *, void *, ...); The rationale explained in the header is that using a vararg is incorrect and has a potential to change the ABI slightly do to compiler optimizations taken and the undefined behavior. They decided to specify the exact number of parameters and for compatibility with old code decided to make the signature require 3 arguments. The third argument is ignored for cases that its not used and its recommended to supply a 0.
-
- 01 11月, 2013 8 次提交
-
-
由 Jeremy Fitzhardinge 提交于
Rather than casting the virBitmap pointer to uint8_t* and then using the structure contents as a byte array, use the virBitmap API to determine the bitmap size and test each bit. Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
-
由 Jim Fehlig 提交于
This reverts commit 394d6e0a. The real problem is accessing the virtBitmap structure as a byte array, which was correctly identified and fixed by Jeremy Fitzhardinge https://www.redhat.com/archives/libvir-list/2013-October/msg01257.html
-
由 Bamvor Jian Zhang 提交于
in recently xen commit: 7051d5c8, there is a api changes in libxl_domain_create_restore. Author: Andrew Cooper <andrew.cooper3@citrix.com> Date: Thu Oct 10 12:23:10 2013 +0100 tools/migrate: Fix regression when migrating from older version of Xen use the macro LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS in libxl.h in order to make libvirt could compile with old and new xen. the params checkpointed_stream is useful if libvirt libxl driver support migration. for new, set it as zero. Signed-off-by: NBamvor Jian Zhang <bjzhang@suse.com>
-
由 Daniel P. Berrange 提交于
When starting a transient VM the first thing done is to check for duplicates. The check looks if there are any running VMs with the matching name/uuid. It explicitly allows there to be inactive VMs, so that a persistent VM can be temporarily booted with a different config. There is a race condition, however, where 2 or more clients try to create the same transient VM. The first client will cause a virDomainObjPtr to be added to the domain list, and it is inactive at this stage. The second client may then come along and see this inactive VM, and mistake it for a persistent VM. If the first VM fails to start its transient guest for any reason, then it'll remove the virDomainObjPtr from the list. The second client now has a virDomainObjPtr that it can try to boot, which libvirt no longer has a record of. The result can be a running QEMU process that is orphaned. It was also, however, possible for the virDomainObjPtr to be completely free'd which will cause libvirtd to crash in some scenarios. The fix is to only allow an existing inactive VM if it is marked as persistent. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Ján Tomko 提交于
Instead of using a port from the remote display range. https://bugzilla.redhat.com/show_bug.cgi?id=1025699
-
由 Ryota Ozaki 提交于
Thie patch fixes the segfault: error : nodeStateInitialize:658 : DBus not available, disabling HAL driver: internal error: Unable to get DBus system bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory error : nodeStateInitialize:719 : ?: Caught Segmentation violation dumping internal log buffer: This segfault occurs at the below VIR_ERROR: failure: if (dbus_error_is_set(&err)) { VIR_ERROR(_("%s: %s"), err.name, err.message); When virDBusGetSystemBus fails, the code jumps to the above failure path. However, the err variable is not correctly initialized before calling virDBusGetSystemBus. As a result, dbus_error_is_set may pass over the uninitialized err variable whose name or message may point to somewhere unknown memory region, which causes a segfault on VIR_ERROR. The new code initializes the err variable before calling virDBusGetSystemBus. Signed-off-by: NRyota Ozaki <ozaki.ryota@gmail.com>
-
由 Daniel P. Berrange 提交于
Include reference of the VM object pointer and name in debug logs for QEMU start/stop functions. Also make sure we log the PID that we started, since it isn't available elsewhere in the logs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
In debugging a recent oVirt/libvirt race condition, I was very frustrated by lack of logging in the job enter/exit code. This patch adds some key data which would have been useful in by debugging attempts. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-