- 04 2月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
I've received a notice over IRC that on some systems, the virnetdevbandwidthtest is not linked with libxml: /usr/bin/ld: virnetdevbandwidthtest.o: undefined reference to symbol 'xmlStrEqual@@LIBXML2_2.4.30' /usr/lib/x86_64-linux-gnu/libxml2.so.2: error adding symbols: DSO missing from command line Trivial way avoiding this is to add LIBXML_LIBS to virnetdevbandwidthtest_LDADD.
-
- 03 2月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
We support only one spicevmc channel name anyway and the code is prepared to use the default one, there's only one check missing. It is also mentioned in the documentation already and helps defining domains with spice vdagent for people using virsh. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 01 2月, 2014 1 次提交
-
-
由 John Ferlan 提交于
Coverity complains about default: label in libxl_driver.c not be able to be reached. It's by design for the code and since it's not necessary in the code nor does it elicit any compiler/make check warnings - just remove it rather than adding a coverity[dead_error_begin] tag. While I'm at it, lxc_driver.c and nodeinfo.c have the same design, so I removed the default labels and the existing coverity tags.
-
- 31 1月, 2014 7 次提交
-
-
由 Michal Privoznik 提交于
And while doing this, fix one error raised by coverity. With current code, @actual_cmd is allowed to be NULL for the whole run of testVirNetDevBandwidthSet. However, if something else was expected, the @actal_cmd is passed to virtTestDifference which dereference it immediately. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Cédric Bosdonnat 提交于
On openSuse, (and possibly other distros), tc isn't located in /sbin/tc. To get rid of that problem, use TC constant instead of hard coded /sbin/tc in the expected string
-
由 Daniel P. Berrange 提交于
The NWFilter code has as a deadlock race condition between the virNWFilter{Define,Undefine} APIs and starting of guest VMs due to mis-matched lock ordering. In the virNWFilter{Define,Undefine} codepaths the lock ordering is 1. nwfilter driver lock 2. virt driver lock 3. nwfilter update lock 4. domain object lock In the VM guest startup paths the lock ordering is 1. virt driver lock 2. domain object lock 3. nwfilter update lock As can be seen the domain object and nwfilter update locks are not acquired in a consistent order. The fix used is to push the nwfilter update lock upto the top level resulting in a lock ordering for virNWFilter{Define,Undefine} of 1. nwfilter driver lock 2. nwfilter update lock 3. virt driver lock 4. domain object lock and VM start using 1. nwfilter update lock 2. virt driver lock 3. domain object lock This has the effect of serializing VM startup once again, even if no nwfilters are applied to the guest. There is also the possibility of deadlock due to a call graph loop via virNWFilterInstantiate and virNWFilterInstantiateFilterLate. These two problems mean the lock must be turned into a read/write lock instead of a plain mutex at the same time. The lock is used to serialize changes to the "driver->nwfilters" hash, so the write lock only needs to be held by the define/undefine methods. All other methods can rely on a read lock which allows good concurrency. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
There are a number of pthreads impls available on Win32 these days, in particular the mingw64 project has a good impl. Delete the native windows thread implementation and rely on using pthreads everywhere. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
On Fedora 19 and older the pthreads impl provided with mingw does not have any pthread_sigmask impl at all. The configure.ac check was not distinguishing this scenario from that of a broken pthread_sigmask impl, so was mistakenly enabling the libvirt workaround even when it was not needed. This in turn conflicted with the gnulib provided pthread_sigmask impl. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add virRWLock backed up by a POSIX rwlock primitive Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The check-augeas-lockd test depends on the file locking/qemu-lockd.conf, so must be skipped when QEMU is disabled. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 30 1月, 2014 11 次提交
-
-
由 Osier Yang 提交于
Add tests/virscsidata/sg0 and tests/virscsidata/sg8 as the test input for constructing scsi->sg_path. And change the scsi generic number of "1:0:0:0", because it's easy to hide the problem (assuming most machines have a CDROM drive). Signed-off-by: NOsier Yang <jyang@redhat.com>
-
由 Osier Yang 提交于
Commit 10c9ceff intended to introduce new argument for the testing purpose, but it missed the similar changing of the device's sg_path. The problem was hidden since my laptop has the /dev/sg0 and /dev/sg1. A later patch will modify the tests accordingly. Signed-off-by: NOsier Yang <jyang@redhat.com> Reported-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
It breaks the build on RHEL-5.10 and because it's only optional we could remove it from the code. The default namespace will be used. This hunk was introduced by commit 237a088b. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Osier Yang 提交于
This fixes the wrong argument order.
-
由 Osier Yang 提交于
This creates the basic unit tests for the scsi utils. Signed-off-by: NOsier Yang <jyang@redhat.com>
-
由 Osier Yang 提交于
To support passing the path of the test data to the utils, one more argument is added to virSCSIDeviceGetSgName, virSCSIDeviceGetDevName, and virSCSIDeviceNew, and the related code is changed accordingly. Later tests for the scsi utils will be based on this patch. Signed-off-by: NOsier Yang <jyang@redhat.com>
-
由 Osier Yang 提交于
It doesn't make sense to fail if the SCSI host device is specified as "shareable" explicitly between domains (NB, it works if and only if the device is specified as "shareable" for *all* domains, otherwise it fails). To fix the problem, this patch introduces an array for virSCSIDevice struct, which records all the names of domain which are using the device (note that the recorded domains must specify the device as shareable). And the change on the data struct brings on many subsequent changes in the code. Prior to this patch, the "shareable" tag didn't work as expected, it actually work like "non-shareable". So this patch also added notes in formatdomain.html to declare the fact. * src/util/virscsi.h: - Remove virSCSIDeviceGetUsedBy - Change definition of virSCSIDeviceGetUsedBy and virSCSIDeviceListDel - Add virSCSIDeviceIsAvailable * src/util/virscsi.c: - struct virSCSIDevice: Change "used_by" to be an array; Add "n_used_by" as the array count - virSCSIDeviceGetUsedBy: Removed - virSCSIDeviceFree: frees the "used_by" array - virSCSIDeviceSetUsedBy: Copy the domain name to avoid potential memory corruption - virSCSIDeviceIsAvailable: New - virSCSIDeviceListDel: Change the logic, for device which is already in the list, just remove the corresponding entry in "used_by". And since it's only used in one place, we can safely removing the code to find out the dev in the list first. - Copyright updating * src/libvirt_private.sys: - virSCSIDeviceGetUsedBy: Remove - virSCSIDeviceIsAvailable: New * src/qemu/qemu_hostdev.c: - qemuUpdateActiveScsiHostdevs: Check if the device existing before adding it to the list; - qemuPrepareHostdevSCSIDevices: Error out if the not all domains use the device as "shareable"; Also don't try to add the device to the activeScsiHostdevs list if it already there; And make more sensible error w.r.t the current "shareable" value in driver->activeScsiHostdevs. - qemuDomainReAttachHostScsiDevices: Change the logic according to the changes on helpers. Signed-off-by: NOsier Yang <jyang@redhat.com>
-
由 Roman Bogorodskiy 提交于
Check for presence of sys/cpuset.h header and cpuset_getaffinity() in configure instead of just using #ifdef __FreeBSD__ for that code.
-
由 Michal Privoznik 提交于
This reverts commit 2996e6be and some parts of 2636dc8c. The former one tried to implement QoS setting on bridgeless networks. However, as discussed upstream [1], the patch is far away from being useful in even a single case. The whole idea of network QoS is to have aggregated limits over several interfaces. This patch is doing completely the opposite when merging two QoS settings (from the network and the domain interface) into one which is then set at the domain interface itself, not the network. The latter one is the test for the previous one. Now none of them makes sense. 1: https://www.redhat.com/archives/libvir-list/2014-January/msg01441.html Conflicts: tests/virnetdevbandwidthtest.c: New test has been introduced since then.
-
由 Michal Privoznik 提交于
The test tries to set some QoS limits and check if the commands that are actually executed are the expected ones. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
There are some units within libvirt that utilize virCommand API to run some commands and deserve own unit testing. These units are, however, not desired to be rewritten to dig virCommand API usage out. As a great example virNetDevBandwidth could be used. The problem with the bandwidth unit is: it uses virCommand API heavily. Therefore we need a mechanism to not really run a command, but rather see its string representation after which we can decide if the unit construct the correct sequence of commands or not. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 29 1月, 2014 6 次提交
-
-
由 Peter Krempa 提交于
Add support for specifying various types when doing snapshots. This will later allow to do snapshots on network backed volumes. Disks of type 'volume' are not supported by snapshots (yet). Also amend the test suite to check parsing of the various new disk types that can now be specified.
-
由 Jim Fehlig 提交于
Commit df36af58 broke parsing of http response from xend. The prior use of atoi() would happily parse e.g. a string containing "200 OK\r\n", whereas virStrToLong_i() will fail when called with a NULL end_ptr. Change the calls to virStrToLong_i() to provide a non-NULL end_ptr.
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1049391 The new tests would fail in various ways without the two previous commits.
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1049391 When all source CPU XMLs contain just a single CPU model (with a possibly varying set of additional feature elements), virConnectBaselineCPU will try to use this CPU model in the computed guest CPU. Thus, when used on just a single CPU (useful with VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES), the result will not use a different CPU model. If the computed CPU uses the source model, set fallback mode to 'forbid' to make sure the guest CPU will always be as close as possible to the source CPUs.
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1049391 VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES flag for virConnectBaselineCPU did not work if the resulting guest CPU would disable some features present in its base model. This patch makes sure we won't try to add such features twice.
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1049391 virConnectBaselineCPU test results are now stored in different files depending on VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES.
-
- 28 1月, 2014 4 次提交
-
-
由 Ján Tomko 提交于
-
由 Ján Tomko 提交于
Split out the repetitive code.
-
由 Roman Bogorodskiy 提交于
Implement virProcess{Get,Set}Affinity() using cpuset_getaffinity() and cpuset_setaffinity() calls. Quick search showed that they are only available on FreeBSD, so placed it inside existing #ifdef blocks for FreeBSD instead of adding configure checks.
-
由 Pradipta Kr. Banerjee 提交于
Creating a qemu VM with /dev/hwrng as backend RNG device throws the following error - "Could not open '/dev/hwrng': Permission denied" This patch fixes the issue Signed-off-by: NPradipta Kr. Banerjee <bpradip@in.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 27 1月, 2014 5 次提交
-
-
由 Michal Privoznik 提交于
The only API tested so far would be virNetDevBandwidthMinimal. But there's more to come! Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1055484 Currently, libvirt's XML schema of network allows QoS to be defined for every network even though it has no bridge. For instance: <network> <name>vdsm-no-bridge</name> <forward mode='passthrough'> <interface dev='em1.10'/> </forward> <bandwidth> <inbound average='1000' peak='5000' burst='1024'/> <outbound average='1000' burst='1024'/> </bandwidth> </network> The bandwidth limitations can be, however, applied even on such networks. In fact, they are going to be applied on the interface that will be connected to the network on a domain startup. This approach, however, has one limitation. With bridged networks, there are two points where QoS can be set: bridge and domain interface. The lower limit of the two is enforced then. For instance, if the interface has 10Mbps average, but the network only 1Mbps, there's no way for interface to transmit packets faster than the 1Mbps limit. With two points this is enforced by kernel. With only one point, we must combine both QoS settings into one which is set afterwards. Look at virNetDevBandwidthMinimal() and you'll understand immediately what I mean. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Check if cpu stats are read correctly from a sample /proc/stat collected from a 24 CPU machine.
-
由 Ján Tomko 提交于
linuxNodeInfoCPUPopulate is only used in the nodeinfo.c file and in the test suite.
-
由 Dan Kenigsberg 提交于
Quite often, I need to cite URLs like http://libvirt.org/formatnetwork.html#elementQoS but it is annoying to copy them from the table of contents or the html source. This patch borrows from the Python documentation in order to make it easier to cite headers on libvirt's oneline documentation.
-
- 26 1月, 2014 1 次提交
-
-
由 Oleg Strikov 提交于
This patch allows libvirt user to specify 'host-passthrough' cpu mode while using qemu/kvm backend on aarch64. It uses 'host' as a CPU model name instead of some other stub (correct CPU detection is not implemented yet) to allow libvirt user to specify 'host-model' cpu mode as well. Signed-off-by: NOleg Strikov <oleg.strikov@canonical.com> (crobinso: fix some indentation)
-
- 25 1月, 2014 2 次提交
-
-
由 Matthias Bolte 提交于
Windows doesn't allow : in filenames. Commit 21685c95 added files with a : in their names. This broke git operations on Windows as git is not able to create those files on clone or pull. Replace : with - in the offending filenames and adapt the test case.
-
由 John Ferlan 提交于
Currently the qemuDomainGetBlockInfo will return allocation == physical for most backing stores. For a qcow2 block backed device it's possible to return the highest lv extent allocated from qemu for an active guest. That is a value where allocation != physical and one would hope be less. However, if the guest is not running, then the code falls back to returning allocation == physical. This turns out to be problematic for rhev which monitors the size of the backing store. During a migration, before the VM has been started on the target and while it is deemed inactive on the source, there's a small window of time where the allocation is returned as physical triggering the code to extend the file unnecessarily. Since rhev uses transient domains and this is edge condition for a transient domain, rather than returning good status and allocation == physical when this "window of opportunity" exists, this patch will check for a transient (or non persistent) domain and return a failure to the caller rather than returning the defaults. For a persistent domain, the defaults will be returned. The description for the virDomainGetBlockInfo has been updated to describe the phenomena.
-
- 24 1月, 2014 1 次提交
-
-
由 Jiri Denemark 提交于
config-post.h included indirectly from packet-libvirt.c stays in $(top_srcdir) rather than $(top_builddir) which is added automatically.
-