- 19 10月, 2012 4 次提交
-
-
由 Daniel J Walsh 提交于
Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should start defaulting there. I believe this is causing a bug in libvirt-lxc when /selinux does not exists, even though /sys/fs/selinux exists. (cherry picked from commit aa696e18)
-
由 Chuck Short 提交于
Minimal CPU "parser" for armhf to avoid compile time warning. Signed-off-by: NChuck Short <chuck.short@canonical.com> (cherry picked from commit 2d0a777b)
-
由 Guannan Ren 提交于
The result is indeterminate for NULL argument to python functions as follows. It's better to return negative value in these situations. PyObject_IsTrue will segfault if the argument is NULL PyFloat_AsDouble(NULL) is -1.000000 PyLong_AsUnsignedLongLong(NULL) is 0.000000 (cherry picked from commit 4c6be02a)
-
由 Jim Fehlig 提交于
In Xen 4.2, xs.h is deprecated in favor of xenstore.h. xs.h now contains #warning xs.h is deprecated use xenstore.h instead #include <xenstore.h> which fails compilation when warnings are treated as errors. Introduce a configure-time check for xenstore.h and if found, use it instead of xs.h. (cherry picked from commit 416eca18)
-
- 18 10月, 2012 24 次提交
-
-
由 Daniel P. Berrange 提交于
For historical compat we use 'itanium' as the arch name, so if the QEMU binary suffix is 'ia64' we need to translate it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 3887afbb)
-
由 Daniel P. Berrange 提交于
If the qemuAgentClose method is called from a place which holds the domain lock, it is theoretically possible to get a deadlock in the agent destroy callback. This has not been observed, but the equivalent code in the QEMU monitor destroy callback has seen a deadlock. Remove the redundant locking while unrefing the object and the bogus assignment Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 362d0477)
-
由 Daniel P. Berrange 提交于
Some users report (very rarely) seeing a deadlock in the QEMU monitor callbacks Thread 10 (Thread 0x7fcd11e20700 (LWP 26753)): #0 0x00000030d0e0de4d in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x00000030d0e09ca6 in _L_lock_840 () from /lib64/libpthread.so.0 #2 0x00000030d0e09ba8 in pthread_mutex_lock () from /lib64/libpthread.so.0 #3 0x00007fcd162f416d in virMutexLock (m=<optimized out>) at util/threads-pthread.c:85 #4 0x00007fcd1632c651 in virDomainObjLock (obj=<optimized out>) at conf/domain_conf.c:14256 #5 0x00007fcd0daf05cc in qemuProcessHandleMonitorDestroy (mon=0x7fcccc0029e0, vm=0x7fcccc00a850) at qemu/qemu_process.c:1026 #6 0x00007fcd0db01710 in qemuMonitorDispose (obj=0x7fcccc0029e0) at qemu/qemu_monitor.c:249 #7 0x00007fcd162fd4e3 in virObjectUnref (anyobj=<optimized out>) at util/virobject.c:139 #8 0x00007fcd0db027a9 in qemuMonitorClose (mon=<optimized out>) at qemu/qemu_monitor.c:860 #9 0x00007fcd0daf61ad in qemuProcessStop (driver=driver@entry=0x7fcd04079d50, vm=vm@entry=0x7fcccc00a850, reason=reason@entry=VIR_DOMAIN_SHUTOFF_DESTROYED, flags=flags@entry=0) at qemu/qemu_process.c:4057 #10 0x00007fcd0db323cf in qemuDomainDestroyFlags (dom=<optimized out>, flags=<optimized out>) at qemu/qemu_driver.c:1977 #11 0x00007fcd1637ff51 in virDomainDestroyFlags ( domain=domain@entry=0x7fccf00c1830, flags=1) at libvirt.c:2256 At frame #10 we are holding the domain lock, we call into qemuProcessStop() to cleanup QEMU, which triggers the monitor to close, which invokes qemuProcessHandleMonitorDestroy() which tries to obtain the domain lock again. This is a non-recursive lock, hence hang. Since qemuMonitorPtr is a virObject, the unref call in qemuProcessHandleMonitorDestroy no longer needs mutex protection. The assignment of priv->mon = NULL, can be instead done by the caller of qemuMonitorClose(), thus removing all need for locking. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 25f582e3)
-
由 Daniel P. Berrange 提交于
If QEMU quits immediately after we opened the monitor it was possible we would skip the clearing of the SELinux process socket context Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 0b62c073)
-
由 Daniel P. Berrange 提交于
When calling qemuProcessKill from the virDomainDestroy impl in QEMU, do not ignore the return value. This ensures that if QEMU fails to respond to SIGKILL, the caller will know about the failure. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit f1b4021b)
-
由 Daniel P. Berrange 提交于
Depending on the scenario in which LXC containers exit, it is possible for the EOF callback of the LXC monitor to deadlock the driver. #0 0x00000038a0a0de4d in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x00000038a0a09ca6 in _L_lock_840 () from /lib64/libpthread.so.0 #2 0x00000038a0a09ba8 in pthread_mutex_lock () from /lib64/libpthread.so.0 #3 0x00007f4bd9579d55 in virMutexLock (m=<optimized out>) at util/threads-pthread.c:85 #4 0x00007f4bcacc7597 in lxcDriverLock (driver=0x7f4bc40c8290) at lxc/lxc_conf.h:81 #5 virLXCProcessMonitorEOFNotify (mon=<optimized out>, vm=0x7f4bb4000b00) at lxc/lxc_process.c:581 #6 0x00007f4bd9645c91 in virNetClientCloseLocked (client=client@entry=0x7f4bb4009e60) at rpc/virnetclient.c:554 #7 0x00007f4bd96460f8 in virNetClientIOEventLoopPassTheBuck (thiscall=0x0, client=0x7f4bb4009e60) at rpc/virnetclient.c:1306 #8 virNetClientIOEventLoopPassTheBuck (client=0x7f4bb4009e60, thiscall=0x0) at rpc/virnetclient.c:1287 #9 0x00007f4bd96467a2 in virNetClientCloseInternal (reason=3, client=0x7f4bb4009e60) at rpc/virnetclient.c:589 #10 virNetClientCloseInternal (client=0x7f4bb4009e60, reason=3) at rpc/virnetclient.c:561 #11 0x00007f4bcacc4a82 in virLXCMonitorClose (mon=0x7f4bb4000a00) at lxc/lxc_monitor.c:201 #12 0x00007f4bcacc55ac in virLXCProcessCleanup (reason=<optimized out>, vm=0x7f4bb4000b00, driver=0x7f4bc40c8290) at lxc/lxc_process.c:240 #13 virLXCProcessStop (driver=0x7f4bc40c8290, vm=vm@entry=0x7f4bb4000b00, reason=reason@entry=VIR_DOMAIN_SHUTOFF_DESTROYED) at lxc/lxc_process.c:735 #14 0x00007f4bcacc5bd2 in virLXCProcessAutoDestroyDom (payload=<optimized out>, name=0x7f4bb4003c80, opaque=0x7fff41af2df0) at lxc/lxc_process.c:94 #15 0x00007f4bd9586649 in virHashForEach (table=0x7f4bc409b270, iter=iter@entry=0x7f4bcacc5ab0 <virLXCProcessAutoDestroyDom>, data=data@entry=0x7fff41af2df0) at util/virhash.c:514 #16 0x00007f4bcacc52d7 in virLXCProcessAutoDestroyRun (driver=driver@entry=0x7f4bc40c8290, conn=conn@entry=0x7f4bb8000ab0) at lxc/lxc_process.c:120 #17 0x00007f4bcacca628 in lxcClose (conn=0x7f4bb8000ab0) at lxc/lxc_driver.c:128 #18 0x00007f4bd95e67ab in virReleaseConnect (conn=conn@entry=0x7f4bb8000ab0) at datatypes.c:114 When the driver calls virLXCMonitorClose, there is really no need for the EOF callback to be invoked in this case, since the caller can easily handle events itself. In changing this, the monitor needs to take a deep copy of the callback list, not merely a reference. Also adds debug statements in various places to aid troubleshooting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 36c1fc18)
-
由 Jim Fehlig 提交于
Xen upstream c/s 24102:dc8e55c9 bumped the sysctl version to 9. Support this sysctl version in the xen_hypervisor sub-driver. (cherry picked from commit 371ddc98)
-
由 Eric Blake 提交于
Jim Fehlig reported a compilation error with older gcc 4.3.4: libvirt.c: In function 'virDomainGetEmulatorPinInfo': libvirt.c:9111: error: logical '&&' with non-zero constant will always evaluate as true [-Wlogical-op] It looks like someone programmed via too much copy-and-paste. * src/libvirt.c (virDomainGetEmulatorPinInfo): Multiplying by 1 is a no-op, and thus will never overflow. (cherry picked from commit 3da355e8)
-
由 Dmitry Guryanov 提交于
Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com> (cherry picked from commit adae5cf7)
-
由 Dmitry Guryanov 提交于
size of videos array must be increased. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com> (cherry picked from commit 9ca569de)
-
由 Daniel P. Berrange 提交于
SELinux wants all log files opened with O_APPEND. When running non-root though, libvirtd likes to use O_TRUNC to avoid log files growing in size indefinitely. Instead of using O_TRUNC though, we can use O_APPEND and then call ftruncate() which keeps SELinux happier. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 639d5c49)
-
由 Daniel P. Berrange 提交于
There is no need to hold the mutex when unref'ing virObject instances Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 7307c3c0)
-
由 Daniel P. Berrange 提交于
Asynchronously setting priv->mon to NULL was pointless, just remove the destroy callback entirely. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit dd037176)
-
由 Daniel P. Berrange 提交于
Remove custom reference counting from virLXCMonitor, using virObject instead Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 09e0cb42)
-
由 Daniel P. Berrange 提交于
Continue consolidation of process functions by moving some helpers out of command.{c,h} into virprocess.{c,h} Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 9467ab60)
-
由 Daniel P. Berrange 提交于
There are a number of process related functions spread across multiple files. Start to consolidate them by creating a virprocess.{c,h} file Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit e5e2b65c)
-
由 Daniel P. Berrange 提交于
The virCommand prefix was inappropriate because the API does not use any virCommandPtr object instance. This API closely related to waitpid/exit, so use virProcess as the prefix Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 49ecf8b4)
-
由 Daniel P. Berrange 提交于
Change "Pid" to "Process" to align with the virProcessKill API naming prefix Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 0fb58ef5)
-
由 Daniel P. Berrange 提交于
Changing naming to follow the convention of "object" followed by "action" Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit cf470068)
-
由 Daniel P. Berrange 提交于
A prefix change to unmount the SELinux filesystem broke starting of LXC containers with a custom root filesystem (cherry picked from commit 1532bd49)
-
由 Doug Goldstein 提交于
--enable-compile-warnings=error has been renamed to --enable-werror so update the HACKING and the hacking.html to reflect that. (cherry picked from commit 07cbb610)
-
由 Christophe Fergeau 提交于
Commit 9298bfbc introduced code to detect if netcf is linked with libnl1, and to prefer libnl1 over libnl3 when this is the case. This behaviour can be disabled by setting LIBNL_CFLAGS to any value, including the empty string. However, configure.ac sets LIBNL_CFLAGS to "" before attempting libnl detection, so the libnl1 detection code is always disabled. This caused issues on my f17 system where netcf is linked with libnl1 but libvirt got built with libnl3. This commit removes the setting of the LIBNL_* variables to "" as this does not appear to be needed. After this change, libnl1 is used when building libvirt on my f17 system. (cherry picked from commit f6c29515)
-
由 Richard W.M. Jones 提交于
(cherry picked from commit 2b32735a)
-
由 Richard W.M. Jones 提交于
This is just code motion. The semantics of the code should be identical after this change. (cherry picked from commit f644361b)
-
- 24 9月, 2012 4 次提交
-
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: update for the release * po/*.po*: update from transifex and regenerate
-
由 Daniel Veillard 提交于
without systemd we should not try to package the non-installed %{_sysconfdir}/rc.d/init.d/libvirtd
-
由 Daniel Veillard 提交于
$RPM_BUILD_ROOT was embedded in /etc/rc.d/init.d/libvirt-guests
-
由 Daniel P. Berrange 提交于
The Fedora policies don't want us installing the legacy initscripts in parallel with the systemd ones, so switch to only install the systemd unit Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 22 9月, 2012 5 次提交
-
-
由 Laine Stump 提交于
Every level of the code for virNetworkUpdate was assuming that some other level was checking for validity of the "command" arg, but none actually were. The result was that an invalid command code would do nothing, but also report success. Since the command code isn't used until the very lowest level backend functions, that's where I put the check. I made a separate one-line function to log the error. The compiler would have combined the identical strings used by multiple calls if I'd just called virReportError directly in each location, but sending them all to the same string in the source guards against inadvertant divergence (which would lead to extra work for translators.)
-
由 Laine Stump 提交于
1) virNetworkObjUpdate should be an all or none operation, but in the case that we want to update both the live state and persistent config versions of the network, it was committing the update to the live state before starting to update the persistent config. If update of the persistent config failed, we would leave with things in an inconsistent state - the live state would be updated (even though an error was returned), but persistent config unchanged. This patch changed virNetworkObjUpdate to use a separate pointer for each copy of the virNetworkDef, and not commit either of them in the virNetworkObj until both live and config parts of the update have successfully completed. 2) The parsers for various pieces of the virNetworkDef have all sorts of subtle limitations on them that may not be known by the Update[section] function, making it possible for one of these functions to make a modification directly to the object that may not pass the scrutiny of a subsequent parse. But normally another parse wouldn't be done on the data until the *next* time the object was updated (which could leave the network definition in an unusable state). Rather than fighting the losing battle of trying to duplicate all the checks from the parsers into the update functions as well, the more foolproof solution to this is to simply do an extra virNetworkDefCopy() operation on the updated networkdef - virNetworkDefCopy() does a virNetworkFormat() followed by a virNetworkParseString(), so it will do all the checks we need. If this fails, then we don't commit the changed def.
-
由 Laine Stump 提交于
The bridge driver implementation of virNetworkUpdate() removes and re-adds iptables rules any time a network has an <ip>, <forward>, or <forward>/<interface> element updated. There are some types of networks that have those elements and yet have no iptables rules associated with them, and unfortunately the functions that remove/add iptables rules don't check the type of network before attempting to remove/add the rules, sometimes leading to an erroneous failure of the entire update operation. Under normal circumstances I would refactor the lower level functions to be more robust, but to avoid code churn as much as possible, I've just added extra checks directly to networkUpdate().
-
由 Miloslav Trmač 提交于
Nothing uses the return value, and creating it requries otherwise unnecessary strlen () calls. This cleanup is conceptually independent from the rest of the series (although the later patches won't apply without it). This just seems a good opportunity to clean this up, instead of entrenching the unnecessary return value in the virLogOutputFunc instance that will be added in this series. Signed-off-by: NMiloslav Trmač <mitr@redhat.com>
-
由 Tang Chen 提交于
maxcpu and hostcpus are defined and calculated in qemudDomainPinVcpuFlags() and qemudDomainPinEmulator(), but never used. So remove them including nodeinfo. Signed-off-by: NTang Chen <tangchen@cn.fujitsu.com>
-
- 21 9月, 2012 3 次提交
-
-
由 Richard W.M. Jones 提交于
This allows the user to control labelling of each character device separately (the default is to inherit from the VM). Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
-
由 Richard W.M. Jones 提交于
This is just code motion, allowing us to reuse the same function to parse the <seclabel> from character devices too. However it also fixes a possible segfault in the original code if VIR_ALLOC_N returns an error and the cleanup code (at the error: label) tries to iterate over the unallocated array (thanks Michal Privoznik for spotting this). Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
-
由 Jiri Denemark 提交于
Disk hotplug is a two phase action: qemuMonitorAddDrive followed by qemuMonitorAddDevice. When the first part succeeds but the second one fails, we need to rollback the drive addition.
-