- 01 3月, 2013 9 次提交
-
-
由 Michal Privoznik 提交于
Currently, after we removed the qemu driver lock, it may happen that two or more threads will start up a machine with macvlan and race over virNetDevMacVLanCreateWithVPortProfile(). However, there's a racy section in which we are generating a sequence of possible device names and detecting if they exits. If we found one which doesn't we try to create a device with that name. However, the other thread is doing just the same. Assume it will succeed and we must therefore fail. If this happens more than 5 times (which in massive parallel startup surely will) we return -1 without any error reported. This patch is a simple hack to both of these problems. It introduces a mutex, so only one thread will enter the section, and if it runs out of possibilities, error is reported. Moreover, the number of retries is raised to 20.
-
由 Daniel P. Berrange 提交于
This reverts the hack done in commit 568a6cda Author: Jiri Denemark <jdenemar@redhat.com> Date: Fri Feb 15 15:11:47 2013 +0100 qemu: Avoid deadlock in autodestroy since we now have a fix which avoids the deadlock scenario entirely
-
由 Daniel P. Berrange 提交于
There is a lock ordering problem in the QEMU close callback APIs. When starting a guest we have a lock on the VM. We then set a autodestroy callback, which acquires a lock on the close callbacks. When running auto-destroy, we obtain a lock on the close callbacks, then run each callbacks - which obtains a lock on the VM. This causes deadlock if anyone tries to start a VM, while autodestroy is taking place. The fix is to do autodestroy in 2 phases. First obtain all the callbacks and remove them from the list under the close callback lock. Then invoke each callback from outside the close callback lock. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When the auto-destroy callback runs it is supposed to return NULL if the virDomainObjPtr is no longer valid. It was not doing this for transient guests, so we tried to virObjectUnlock a mutex which had been freed. This often led to a crash. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Guannan Ren 提交于
-
由 Guannan Ren 提交于
-
由 Jiri Denemark 提交于
qemuProcessStart expects to be run with a job already set and every caller except for qemuMigrationPrepareAny use it correctly. This bug can be observed in libvirtd logs during incoming migration as warning : qemuDomainObjEnterMonitorInternal:979 : This thread seems to be the async job owner; entering monitor without asking for a nested job is dangerous
-
由 Jim Fehlig 提交于
With the apparmor security driver enabled, qemu instances fail to start # grep ^security_driver /etc/libvirt/qemu.conf security_driver = "apparmor" # virsh start test-kvm error: Failed to start domain test-kvm error: internal error security label already defined for VM The model field of virSecurityLabelDef object is always populated by virDomainDefGetSecurityLabelDef(), so remove the check for a NULL model when verifying if a label is already defined for the instance. Checking for a NULL model and populating it later in AppArmorGenSecurityLabel() has been left in the code to be consistent with virSecuritySELinuxGenSecurityLabel().
-
由 Serge Hallyn 提交于
As pointed out in https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1034661 The sentence "The function of PCI device addresses must less than 8" does not quite make sense. Update that to read "The function of PCI device addresses must be less than 8" Signed-off-by: NSerge Hallyn <serge.hallyn@ubuntu.com>
-
- 28 2月, 2013 9 次提交
-
-
由 Michal Privoznik 提交于
Currently, qemuDomainShutdownFlags() chooses the agent method of shutdown whenever the agent is configured. However, this assumption is not enough as the guest agent may be unresponsive at the moment. So unless guest agent method has been explicitly requested, we should fall back to the ACPI method.
-
由 Viktor Mihajlovski 提交于
The unitialized local variable qemuVersion can cause an random value to be returned for the hypervisor version, observable with virsh version. Introduced by commit b46f7f4aSigned-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Paolo Bonzini 提交于
disk->src is still used for disks->hosts->name, do not free it. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
* docs/formatnetwork.html.in: Spell variation correctly.
-
由 Daniel P. Berrange 提交于
The QEMU driver has a list of devices nodes that are whitelisted for all guests. The kernel has recently started returning an error if you try to whitelist a device which does not exist. This causes a warning in libvirt logs and an audit error for any missing devices. eg 2013-02-27 16:08:26.515+0000: 29625: warning : virDomainAuditCgroup:451 : success=no virt=kvm resrc=cgroup reason=allow vm="vm031714" uuid=9d8f1de0-44f4-a0b1-7d50-e41ee6cd897b cgroup="/sys/fs/cgroup/devices/libvirt/qemu/vm031714/" class=path path=/dev/kqemu rdev=? acl=rw Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
s/VIR_QEMU_PROCESS_START_AUTODESROY/VIR_QEMU_PROCESS_START_AUTODESTROY/ Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The code for putting the emulator threads in a separate cgroup would spam the logs with warnings 2013-02-27 16:08:26.731+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 3 2013-02-27 16:08:26.731+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 4 2013-02-27 16:08:26.732+0000: 29624: warning : virCgroupMoveTask:887 : no vm cgroup in controller 6 This is because it has only created child cgroups for 3 of the controllers, but was trying to move the processes from all the controllers. The fix is to only try to move threads in the controllers we actually created. Also remove the warning and make it return a hard error to avoid such lazy callers in the future. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virQEMUCloseCallbacksRunOne method was passing a uuid string to virDomainObjListFindByUUID, when it actually expected to get a raw uuid buffer. This was not caught by the compiler because the method was using a 'void *uuid' instead of first casting it to the expected type. This regression was accidentally caused by refactoring in commit 568a6cda Author: Jiri Denemark <jdenemar@redhat.com> Date: Fri Feb 15 15:11:47 2013 +0100 qemu: Avoid deadlock in autodestroy Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=896092 mentions that qemu 1.4 and earlier only accept a simple start-stop range for the cpu=... argument of -numa. Libvirt would attempt to use -numa cpu=1,3 for a disjoint range, which did not work as intended. Upstream qemu will be adding a new syntax for disjoint cpu ranges in 1.5; but the design for that syntax is still under discussion at the time of this patch. So for libvirt 1.0.3, it is safest to just reject attempts to build an invalid qemu command line; in the future, we can add a capability bit and translate to the final accepted design for selecting a disjoint cpu range in numa. * src/qemu/qemu_command.c (qemuBuildNumaArgStr): Reject disjoint ranges.
-
- 27 2月, 2013 17 次提交
-
-
由 Laine Stump 提交于
This reverts commit 383ebc46. We decided the xml for this feature needed more thought to make sure we are doing it the best way, in particular wrt option values that have multiple items.
-
由 Peter Krempa 提交于
To avoid confusion about usage of this function explicitly document that this function returns copy of the attribute string.
-
由 Peter Krempa 提交于
Users may want to specify XML entities in paths to devices. Ensure they are parsed and used properly.
-
由 Peter Krempa 提交于
-
由 Ján Tomko 提交于
Reported by John Ferlan.
-
由 Michal Privoznik 提交于
These two flags in fact are mutually exclusive. Requesting them both doesn't make any sense regardless of hypervisor driver. Hence, we have to make it within libvirt.c file instead of fixing it in each driver.
-
由 Philipp Hahn 提交于
Add qed for dirfs pool. Add ocfs2 for disk pool. Add lvm2 for disk and logical pool. Add cifs and glusterfs for netfs pool. Note: POOL_DISK_LVM2 can not be created by "parted mklabel", but is only returned from auto-detection on disk pools. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Eric Blake 提交于
Eugene Marcotte reported that if gcrypt-devel (a prereq of gnutls-devel) is not present, then compilation fails due to an unconditional use of <gcrypt.h>. * src/libvirt.c (includes): Properly guard use of gcrypt.h.
-
由 Eric Blake 提交于
This reverts commit 0bbbd42c. The design for this feature is not complete, and may change the name of the 'schid' attribute. Revert requested by Viktor Mihajlovski.
-
由 Eric Blake 提交于
This reverts commit 24aa7f8d. The implementation to match the documentation is not complete yet, and the final design might change the name of the 'schid' attribute.
-
由 Philipp Hahn 提交于
virStrToLong(..., 8, ...) already requires the mode to be octal. Change the relax-ng schema to check for octal as well. Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
由 Eric Blake 提交于
virstoragetest was failing on RHEL 5, but with no good error message: TEST: virstoragetest 0 FAIL It turns out that qemu-img was so old, that it lacked support for -o backing_file. It didn't help that the test was also using qemu-img from PATH, even after first probing for kvm-img. * tests/virstoragetest.c (testPrepImages): Consistently use discovered binary. Skip instead of fail if qemu-img fails during setup.
-
由 Doug Goldstein 提交于
This fixes a potential NULL deref identified by John Ferlan <jferlan@redhat.com> if scandir() didn't return an expected value.
-
由 Daniel P. Berrange 提交于
The parallels storage driver declared some loop variables inside the for(;;). This is not allowed by libvirt coding standards Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
This change tried to fix a crash with changing CDROM media but failed to actually do so commit d0172d2b Author: Osier Yang <jyang@redhat.com> Date: Tue Feb 19 20:27:45 2013 +0800 qemu: Remove the shared disk entry if the operation is ejecting or updating It was still accessing disk->src, when the entire 'disk' object has been free'd already. Even if it weren't free'd, accessing the 'src' value of virDomainDiskDef is not allowed without first validating disk->type is file or block. Just remove the broken code entirely. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Eric Blake 提交于
On RHEL 5, 'make check' included failures such as: TEST: virstoragetest unable to create directory /virstoragedata/sub unable to return to correct directory, refusing to clean up /virstoragedata It turns out that with automake 1.9.x, $(abs_builddir) is not automatically provided. We have previously worked around this by using `pwd` before, but because we did not do it everywhere, we had a number of broken tests. This patch brings RHEL 5 from 8 failed tests down to 5 (the remaining failures may be due to bugs in the older libxml2 and RNG schema validation available in RHEL 5, so I'm not sure if they can be fixed in libvirt, but I'm still investigating). * tests/Makefile.am (AM_CFLAGS): Reliably set abs_builddir. (*_la_CFLAGS): Factor out common settings; delete when nothing remains to be added.
-
由 Eric Blake 提交于
On RHEL 5, I noticed this test failure message: TEST: qemumonitorjsontest libvirt not compiled with yajl, skippingSKIP: qemumonitorjsontest * tests/virstoragetest.c (testPrepImages): Use simpler fputs. * tests/qemumonitorjsontest.c (mymain): Ensure trailing newline.
-
- 26 2月, 2013 5 次提交
-
-
由 Ján Tomko 提交于
VIR_ERR_NO_CONNECT already contains "no connection driver available". This patch changes: no connection driver available for No connection for URI hello to: no connection driver available for hello Bug: https://bugzilla.redhat.com/show_bug.cgi?id=851413
-
由 Paolo Bonzini 提交于
Currently we call virSetDeviceUnprivSGIO with val == 0 if a block device has an sgio attribute. But for sgio='filtered', we know that a kernel with no unpriv_sgio support will always behave as the user wanted. In this case, there is no need to call the function and report a (bogus) error. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Eric Blake 提交于
testutils.c likes to print summaries after a test completes, including if it failed. But if the test outright exit()s, this summary is skipped. Enforce that we return instead of exit. * cfg.mk (sc_prohibit_exit_in_tests): New syntax check. * tests/commandhelper.c (main): Fix offenders. * tests/qemumonitorjsontest.c (mymain): Likewise. * tests/seclabeltest.c (main): Likewise. * tests/securityselinuxlabeltest.c (mymain): Likewise. * tests/securityselinuxtest.c (mymain): Likewise. * tests/testutils.h (VIRT_TEST_MAIN_PRELOAD): Likewise. * tests/testutils.c (virtTestMain): Likewise. (virtTestCaptureProgramOutput): Use symbolic name.
-
由 Eric Blake 提交于
Now that the segfault is solved, we can skip instead of fail the test when yajl is not present. * tests/qemumonitorjsontest.c (mymain): Skip if no yajl.
-
由 Eric Blake 提交于
On a machine without yajl headers, I was seeing random segfaults from qemumonitorjsontest (about 90% of the runs on my particular machine). The segfault was inside virClassIsDerivedFrom, which points to a case of a race leading to unreferencing a stale pointer to an object that had already been freed. I also noticed that if I got the segfault, I was seeing messages such as: 2013-02-22 16:12:37.504+0000: 19833: error : virNetSocketWriteWire:1361 : Cannot write data: Bad file descriptor which is also evidence of deferencing a stale pointer. I traced it to a race where qemuMonitorTestIO could execute late, after the main thread had already called qemuMonitorTestFree and called virNetSocketClose(test->client) but not clearing it out to NULL. Sure enough, after test->client has been closed, fd is -1, which causes an attempt to write to the socket to fail, which in turn triggers the error code of qemuMonitorTestIO that tries to re-close test->client. * tests/qemumonitortestutils.c (qemuMonitorTestIO): Don't attempt to free client again if test already quit.
-