- 10 12月, 2013 4 次提交
-
-
由 Martin Kletzander 提交于
Since kernel 3.12 (commit 34ff8dc08956098563989d8599840b130be81252 in linux-stable.git in particular) the value for 'unlimited' in cgroup memory limits changed from LLONG_MAX to ULLONG_MAX. Due to rather unfortunate choice of our VIR_DOMAIN_MEMORY_PARAM_UNLIMITED constant (which we transfer as an unsigned long long in Kibibytes), we ended up with the situation described below (applies to x86_64): - 2^64-1 (ULLONG_MAX) -- "unlimited" in kernel = 3.12 - 2^63-1 (LLONG_MAX) -- "unlimited" in kernel < 3.12 - 2^63-1024 -- our PARAM_UNLIMITED scaled to Bytes - 2^53-1 -- our PARAM_UNLIMITED unscaled (in Kibibytes) This means that when any number within (2^63-1, 2^64-1] is read from memory cgroup, we are transferring that number instead of "unlimited". Unfortunately, changing VIR_DOMAIN_MEMORY_PARAM_UNLIMITED would break ABI compatibility and thus we have to resort to a different solution. With this patch every value greater than PARAM_UNLIMITED means "unlimited". Even though this may seem misleading, we are already in such unclear situation when running 3.12 kernel with memory limits set to 2^63. One example showing most of the problems at once (with kernel 3.12.2): # virsh memtune asdf --hard-limit 9007199254740991 --swap-hard-limit -1 # echo 12345678901234567890 >\ /sys/fs/cgroup/memory/machine/asdf.libvirt-qemu/memory.soft_limit_in_bytes # virsh memtune asdf hard_limit : 18014398509481983 soft_limit : 12056327051986884 swap_hard_limit: 18014398509481983 Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Cole Robinson 提交于
We were unconditionally removing the device from the host list, when it should only be done on error. This fixes USB collision detection when hotplugging the same device to two guests.
-
由 Cole Robinson 提交于
If we hit a collision, we free the USB device while it is still part of our temporary USBDeviceList. When the list is unref'd, the device is free'd again. Make the initial device freeing dependent on whether it is present in the temporary list or not.
-
由 Cole Robinson 提交于
Similar to what Jiri did for cgroup setup/teardown in 05e149f9, push it all into the device handler functions so we can do the necessary prep work before claiming the device. This also fixes hotplugging USB devices by product/vendor (virt-manager's default behavior): https://bugzilla.redhat.com/show_bug.cgi?id=1016511
-
- 09 12月, 2013 1 次提交
-
-
由 Jiri Denemark 提交于
Mention the need to set memtune/hard_limit. https://bugzilla.redhat.com/show_bug.cgi?id=1035954
-
- 07 12月, 2013 6 次提交
-
-
由 Jim Fehlig 提交于
The libvirt-daemon package contains several driver-specific files, directories, and script, which can be problematic when building the package with multiple hypervisor support, e.g. both QEMU and Xen. E.g. installing a QEMU+Xen enabled libvirt-daemon on a Xen-only system will result in the creation of qemu and kvm groups and a qemu user. Move the driver-specific files, directories, and script to the respective driver subpackages.
-
由 Jim Fehlig 提交于
Collapse the various {with_<hypervisor>} conditionals in the libvirt-daemon package files section into a single {with_<hypervisor>} conditional
-
由 Jim Fehlig 提交于
Move some hypervisor-specific files in the libvirt-daemon subpackage within conditionals for those hypervisors.
-
由 Jim Fehlig 提交于
The daemon-config-{network,nwfilter} subpackages are built regardless of whether or not with_driver_modules is defined, therefore don't conditionally define their files list.
-
由 Jim Fehlig 提交于
The %pre script in libvirt-daemon is specific to qemu, so only include it if building with qemu support.
-
由 Jim Fehlig 提交于
Ensure nwfilter files lists and dependencies are conditional upon with_nwfilter being defined.
-
- 06 12月, 2013 8 次提交
-
-
由 Chen Hanxiao 提交于
Currently, if virFileMakePath() fails, the @ret is left initialized from virAsprintf() just a few lines above leading to a wrong return value of zero whereas -1 should be returned. Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Zhou Yimin 提交于
Unifying codding style, replace 'newpath' with 'newPath'. From: Zhou Yimin <zhouyimin@huawei.com>
-
由 Ján Tomko 提交于
55bfd020 added a 'ram' attribute for qxl video devices but didn't update the ABI check. https://bugzilla.redhat.com/show_bug.cgi?id=1035123
-
由 Peter Krempa 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1035108 When attempting to enable more vCPUs in the guest than is currently enabled in the guest but less than the maximum count for the VM we currently reported an unhelpful message: error: internal error: guest agent reports less cpu than requested This patch changes it to: error: invalid argument: requested vcpu count is greater than the count of enabled vcpus in the domain: 3 > 2
-
由 Peter Krempa 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1035118 When outputting the XML for the RNG device, the code didn't format the PCI address info. Additionally the schema wasn't expecting the info although it was being parsed and used internally. Fix those mistakes and add test for the PCI info section.
-
由 Peter Krempa 提交于
When changing the parsing and formatting functions in commit 43f2ccdc I forgot to update the qemu disk alignment function for snapshots that automatically adds snapshot configs for disks that were not mentioned in the XML. The function allocated a new disk snapshot definition but did not correctly initialize the snapshot disk source type variable. This resulted into the disks considered as block devices and invalid XML was generated. Reported by John Ferlan.
-
由 Cole Robinson 提交于
They aren't used outside of qemu_hotplug.c
-
由 Wang Yufei 提交于
Delete the extra article 'the'. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 12月, 2013 12 次提交
-
-
由 Michal Privoznik 提交于
In 78839da0 I am trying to join the worker threads. However, I can't sipmly reuse pool->nWorkers (same applies for pool->nPrioWorkers), because of the following flow that is currently implemented: 1) the main thread executing virThreadPoolFree sets pool->quit = true, wakes up all the workers and wait on pool->quit_cond. 2) A worker is woken up and see quit request. It immediately jumps of the while() loop and decrements pool->nWorkers (or pool->nPrioWorkers in case of priority worker). The last thread signalizes pool->quit_cond. 3) Main thread is woken up, with both pool->nWorkers and pool->nPrioWorkers being zero. So there's a need to copy the original value of worker thread counts into local variables. However, these need to set *after* the check for pool being NULL (dereferencing a NULL is no no). And for safety they can be set right after the pool is locked. Reported-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Commit e1a4d08b was pushed with bad indentation the iSCSI pool translation code.
-
由 Peter Krempa 提交于
Commit 5a66c667 fixed a NULL dereference if the disk driver element was empty. Add a test for this case.
-
由 Peter Krempa 提交于
There were plenty snapshot XMLs in the tests/domainsnapshotxml2xmlin directory that actually weren't used in XML testing. The upgraded domainsnapshotxml2xml test now allows us to use them.
-
由 Peter Krempa 提交于
The new tests that will be added later would collide with files of existing tests. Move and rename those files.
-
由 Peter Krempa 提交于
Until now the test was only testing redefinition of snapshot XMLs stored in tests/domainsnapshotxml2xmlout. This patch adds new infrastructure to allow testing of files that may differ and will allow to utilize files in tests/domainsnapshotxml2xmlin as new tests too.
-
由 Peter Krempa 提交于
The 'internal' variable holds only two states; convert it to a boolean and the 'fail' label should be called 'cleanup'. This patch also fixes a minor memory leak of driver capabilities in case the XML config object can't be allocated.
-
由 Adam Walters 提交于
This patch resolves a compile issue caused by the removal of examples/domsuspend code in commit 5eb4b042. This issue is only seen in a fresh checkout, but causes the build and configure to fail.
-
由 Wangyufei (James) 提交于
When an error occurred in qemuAgentIO, it will be saved in mon->lastError, but it will not be freed at the end. Present since commit c160ce33; and compare to commit 9cc8a5af fixing the same problem in qemu_monitor.c. ==22219== 54 bytes in 1 blocks are definitely lost in loss record 982 of 1,379 ==22219== at 0x4C26B9B: malloc (vg_replace_malloc.c:263) ==22219== by 0x8520521: strdup (in /lib64/libc-2.11.3.so) ==22219== by 0x52E99CB: virStrdup (virstring.c:554) ==22219== by 0x52B44C4: virCopyError (virerror.c:195) ==22219== by 0x52B5123: virCopyLastError (virerror.c:312) ==22219== by 0x10905877: qemuAgentIO (qemu_agent.c:660) ==22219== by 0x52B6122: virEventPollDispatchHandles (vireventpoll.c:501) ==22219== by 0x52B7AEA: virEventPollRunOnce (vireventpoll.c:647) ==22219== by 0x52B5C1B: virEventRunDefaultImpl (virevent.c:274) ==22219== by 0x54181FD: virNetServerRun (virnetserver.c:1112) ==22219== by 0x11EF4D: main (libvirtd.c:1513) Signed-off-by: NZhou Yimin <zhouyimin@huawei.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Nehal J Wani 提交于
This patch fixes memory leaks reported by valgrind on running qemuxml2argvtest; introduced in commit 0df53f04. Most of them are of the form: ==24777== 15 bytes in 1 blocks are definitely lost in loss record 39 of 129 ==24777== at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==24777== by 0x341F485E21: strdup (strdup.c:42) ==24777== by 0x4CADE5F: virStrdup (virstring.c:554) ==24777== by 0x4362B6: qemuBuildDriveStr (qemu_command.c:3848) ==24777== by 0x43EF73: qemuBuildCommandLine (qemu_command.c:8500) ==24777== by 0x426670: testCompareXMLToArgvHelper (qemuxml2argvtest.c:350) ==24777== by 0x427C01: virtTestRun (testutils.c:138) ==24777== by 0x41DDB5: mymain (qemuxml2argvtest.c:658) ==24777== by 0x4282A2: virtTestMain (testutils.c:593) ==24777== by 0x341F421A04: (below main) (libc-start.c:225) ==24777== Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Kill the use of atoi() and introduce syntax check to forbid it and it's friends (atol, atoll, atof, atoq). Also fix a typo in variable name holding the cylinders count of a disk pool (apparently unused). examples/domsuspend/suspend.c will need a larger scale refactor as the whole example file is broken thus it will be exempted from the syntax check for now.
-
由 Peter Krempa 提交于
The domsuspend example code is a really old and bad exmample of (how not to use) the libvirt API. Remove it as it's apparent that nobody tried to use it. It was broken and nobody complained.
-
- 04 12月, 2013 9 次提交
-
-
由 Daniel P. Berrange 提交于
The SELinux security driver would overwrite errors from the virConfReadFile function. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
Even though currently we are freeing the pool of worker threads at the daemon very end, nothing holds us back in joining the worker threads. Moreover, we avoid leaks like this: ==26697== 1,680 bytes in 5 blocks are possibly lost in loss record 913 of 942 ==26697== at 0x4C2BDE4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==26697== by 0x4011131: allocate_dtv (in /lib64/ld-2.16.so) ==26697== by 0x401176D: _dl_allocate_tls (in /lib64/ld-2.16.so) ==26697== by 0x8499602: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.16.so) ==26697== by 0x52F53E9: virThreadCreate (virthreadpthread.c:188) ==26697== by 0x52F5D4F: virThreadPoolNew (virthreadpool.c:221) ==26697== by 0x53F30DB: virNetServerNew (virnetserver.c:377) ==26697== by 0x11C6ED: main (libvirtd.c:1366) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Shivaprasad G Bhat 提交于
Ever since the subcpusets(vcpu,emulator) were introduced, the parent cpuset cannot be modified to remove the nodes that are in use by the subcpusets. The fix is to break the memory node modification into three steps: 1. assign new nodes into the parent, 2. change the nodes in the child nodes, 3. remove the old nodes on the parent node. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1009880Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 John Ferlan 提交于
The storageRegister() didn't check the return from the virRegisterStorageDriver() like other callers did, so Coverity flagged it. Just check the return and handle.
-
由 John Ferlan 提交于
The networkRegister() didn't check the return status of the virRegisterNetworkDriver() call like other callers, so just check and handle here as well.
-
由 John Ferlan 提交于
-
由 John Ferlan 提交于
The x509dname is only set inside a WITH_GNUTLS conditional, so when used/check later on for NULL, Coverity detects this is not possible. Added WITH_GNUTLS around uses to remove message
-
由 John Ferlan 提交于
The nwfilterStateInitialize() would only assign sysbus inside a WITH_DBUS conditional, thus leaving a subsequent check for sysbus and nwfilterDriverInstallDBusMatches() as a no-op Rather than try to add WITH_DBUS conditions which ended up conflicting with the usage of HAVE_FIREWALLD conditionals, just remove the WITH_DBUS since virdbus.c has entry points for with and without conditions.
-
由 Michal Privoznik 提交于
The make inserts six spaces instead of four: GEN access/viraccessapichecklxc.h GEN hyperv/hyperv_wmi.generated.h GEN access/viraccessapichecklxc.c GEN hyperv/hyperv_wmi.generated.c GEN hyperv/hyperv_wmi_classes.generated.typedef GEN hyperv/hyperv_wmi_classes.generated.h GEN hyperv/hyperv_wmi_classes.generated.c GEN libvirt_access_qemu.xml GEN libvirt_access.syms GEN libvirt_access_lxc.xml GEN libvirt_access_qemu.syms GEN libvirt_access_lxc.syms GEN libvirt_qemu.def GEN esx/esx_vi_types.generated.typedef GEN esx/esx_vi_types.generated.typeenum GEN esx/esx_vi_types.generated.typetostring GEN esx/esx_vi_types.generated.typefromstring GEN esx/esx_vi_types.generated.h GEN esx/esx_vi_types.generated.c GEN esx/esx_vi_methods.generated.h GEN esx/esx_vi_methods.generated.c GEN esx/esx_vi_methods.generated.macro GEN esx/esx_vi.generated.h GEN esx/esx_vi.generated.c GEN libvirt_lxc.def Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-