- 08 6月, 2012 12 次提交
-
-
由 Daniel P. Berrange 提交于
The virLogSetFromEnv call was done too late in startup to catch many log messages (eg from security driver initialization). To assist debugging also explicitly log the security details at startup (cherry picked from commit 43ee9873)
-
由 Daniel P. Berrange 提交于
The driver->securityDriverName field may be NULL, if automatic probing is used to determine security driver. This meant that unless selinux was explicitly requested in lxc.conf, it was not being sent to the libvirt_lxc process. The driver->securityManager field is guaranteed non-NULL, since there will always be the 'none' security driver present if nothing else exists. So use that to set the driver name for libvirt_lxc Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit 3746b070)
-
由 Daniel P. Berrange 提交于
Currently the libvirt_lxc process uses VIR_DOMAIN_XML_INACTIVE when loading the XML for the container. This means it loses any dynamic data such as the, just allocated, SELinux label. Further there is an inconsistency in the libvirt LXC driver whereby it saves the live config XML and then later overwrites the file with the live status XML instead. Add a comment about this for future reference. * src/lxc/lxc_controller.c: Remove VIR_DOMAIN_XML_INACTIVE when loading XML * src/lxc/lxc_driver.c: Add comment about inconsistent config file formats Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> (cherry picked from commit eb06375a)
-
由 Eric Blake 提交于
Otherwise, a string such as _("Don't use \"" VAR "\".") would complain about unmarked diagnostics. * cfg.mk (sc_libvirt_unmarked_diagnostics): Handle \" in message. (cherry picked from commit 8f3728f8)
-
由 Josh Durgin 提交于
Signed-off-by: NJosh Durgin <josh.durgin@dreamhost.com> (cherry picked from commit b57e0153)
-
由 Josh Durgin 提交于
This works with newer qemu that doesn't allow escaping spaces. It's backwards compatible as well. Signed-off-by: NJosh Durgin <josh.durgin@dreamhost.com> (cherry picked from commit d50cae33)
-
由 Alex Jia 提交于
In fact, the 'tapfd' is always NULL, the function 'virNetDevTapCreate()' hasn't assign 'fd' to 'tapfd', when the function 'virNetDevSetMAC()' is failed then goto 'error' label, finally, the VIR_FORCE_CLOSE() will deref a NULL 'tapfd'. * util/virnetdevtap.c (virNetDevTapCreateInBridgePort): fix a NULL pointer derefing. * How to reproduce? $ cat > /tmp/net.xml <<EOF <network> <name>test</name> <forward mode='nat'/> <bridge name='br1' stp='off' delay='1' /> <mac address='00:00:00:00:00:00'/> <ip address='192.168.100.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.100.2' end='192.168.100.254' /> </dhcp> </ip> </network> EOF $ virsh net-define /tmp/net.xml $ virsh net-start test error: Failed to start network brTest error: End of file while reading data: Input/output error Signed-off-by: NAlex Jia <ajia@redhat.com> (cherry picked from commit 5ee18aaa)
-
由 Osier Yang 提交于
It doesn't break out the "for" loop even if duplicate pool is found, and thus the "matchpool" could be overriden as NULL again if there is different pool afterwards. To address the problem in libvirt-user list: https://www.redhat.com/archives/libvirt-users/2012-April/msg00150.html (cherry picked from commit 980f12be)
-
由 Jiri Denemark 提交于
When libvirtd is started, we create "libvirt/qemu" directories under hugetlbfs mount point. Only the "qemu" subdirectory is chowned to qemu user and "libvirt" remains owned by root. If umask was too restrictive when libvirtd started, qemu user may lose access to "qemu" subdirectory. Let's explicitly grant search permissions to "libvirt" directory for all users. (cherry picked from commit 9d2ac545)
-
由 Michal Privoznik 提交于
Currently, qemu GA is not providing 'desc' field for errors like we are used to from qemu monitor. Therefore, we fall back to this general 'unknown error' string. However, GA is reporting 'class' which is not perfect, but much more helpful than generic error string. Thus we should fall back to class firstly and if even no class is presented, then we can fall back to that generic string. Before this patch: virsh # dompmsuspend --target mem f16 error: Domain f16 could not be suspended error: internal error unable to execute QEMU command 'guest-suspend-ram': unknown QEMU command error After this patch: virsh # dompmsuspend --target mem f16 error: Domain f16 could not be suspended error: internal error unable to execute QEMU command 'guest-suspend-ram': The command has not been found (cherry picked from commit 37803108)
-
由 Stefan Berger 提交于
More bug extermination in the category of: Error: CHECKED_RETURN: /libvirt/src/conf/network_conf.c:595: check_return: Calling function "virAsprintf" without checking return value (as is done elsewhere 515 out of 543 times). /libvirt/src/qemu/qemu_process.c:2780: unchecked_value: No check of the return value of "virAsprintf(&msg, "was paused (%s)", virDomainPausedReasonTypeToString(reason))". /libvirt/tests/commandtest.c:809: check_return: Calling function "setsid" without checking return value (as is done elsewhere 4 out of 5 times). /libvirt/tests/commandtest.c:830: unchecked_value: No check of the return value of "virTestGetDebug()". /libvirt/tests/commandtest.c:831: check_return: Calling function "virTestGetVerbose" without checking return value (as is done elsewhere 41 out of 42 times). /libvirt/tests/commandtest.c:833: check_return: Calling function "virInitialize" without checking return value (as is done elsewhere 18 out of 21 times). One note about the error in commandtest line 809: setsid() seems to fail when running the test -- could be removed ? (cherry picked from commit 59b935f5)
-
由 Stefan Berger 提交于
Error: UNINIT: /libvirt/src/lxc/lxc_driver.c:1412: var_decl: Declaring variable "fd" without initializer. /libvirt/src/lxc/lxc_driver.c:1460: uninit_use_in_call: Using uninitialized value "fd" when calling "virFileClose". /libvirt/src/util/virfile.c:50: read_parm: Reading a parameter value. Error: DEADCODE: /libvirt/src/lxc/lxc_controller.c:960: dead_error_condition: On this path, the condition "ret == 4" cannot be true. /libvirt/src/lxc/lxc_controller.c:959: at_most: After this line, the value of "ret" is at most -1. /libvirt/src/lxc/lxc_controller.c:959: new_values: Noticing condition "ret < 0". /libvirt/src/lxc/lxc_controller.c:961: dead_error_line: Execution cannot reach this statement "continue;". Error: UNINIT: /libvirt/src/lxc/lxc_controller.c:1104: var_decl: Declaring variable "consoles" without initializer. /libvirt/src/lxc/lxc_controller.c:1237: uninit_use: Using uninitialized value "consoles". (cherry picked from commit f74471de)
-
- 18 5月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Ever since commit c964b6aa, make was trying to find the timestamp of '""./apibuild.py".stamp"', but only touching 'apibuild.py.stamp', and thus always rebuilding. Reported by Daniel P. Berrange. * docs/Makefile.am (APIBUILD, APIBUILD_STAMP): Omit bogus quotes. (cherry picked from commit c0057d9a)
-
- 17 5月, 2012 1 次提交
-
-
由 Eric Blake 提交于
This reverts commit 372a14c6. We shoul not have cherry-picked 28ae4ff0 without also cherry-picking 2223ea98, but the latter is too complex for a stable branch.
-
- 28 4月, 2012 8 次提交
-
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
We were using the libvirt release version (like 0.9.11) and not the configure version (which for stable releases is 0.9.11.X) Most other places got this right so hopefully that's all the fallout from the version format change :) Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Use a witness file approach like we do for python/generator.py, as suggested by Eric. Fixes the build issue reported here: https://www.redhat.com/archives/libvir-list/2012-April/msg01435.htmlSigned-off-by: NCole Robinson <crobinso@redhat.com> Conflicts: .gitignore
-
由 Cole Robinson 提交于
Since for stable releases, some test files were over the 99 char limit for traditional tar filenames. Suggested by Osier here: https://www.redhat.com/archives/libvir-list/2012-April/msg01435.htmlSigned-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=816662 pointed out that attempting 'virsh blockpull' on an offline domain gave a misleading error message about qemu lacking support for the operation, even when qemu was specifically updated to support it. The real problem is that we have several capabilities that are only determined when starting a domain, and therefore are still clear when first working with an inactive domain (namely, any capability set by qemuMonitorJSONCheckCommands). While this patch was able to hoist an existing check in one of the three culprits, it had to add redundant checks in the other two places (because you always have to check for an active domain after obtaining a VM job lock, but the capability bits were being checked prior to obtaining the job lock). Someday it would be nice to patch libvirt to cache the set of capabilities per qemu binary (as determined by inode and timestamp), rather than re-probing the binary every time a domain is started, and to teach the cache how to query the monitor during the one time the probe is made rather than having to wait until a guest is started; then, a capability probe would succeed even for offline guests because it just refers to the cache, and the single check for an active domain after grabbing the job lock would be sufficient. But since that will involve a lot more coding, I'm happy to go with this simpler solution for an immediate solution. * src/qemu/qemu_driver.c (qemuDomainPMSuspendForDuration) (qemuDomainSnapshotCreateXML, qemuDomainBlockJobImpl): Check for offline state before checking an online-only cap. Conflicts: src/qemu/qemu_driver.c
-
由 Stefan Berger 提交于
This patch addresses the following coverity findings: /libvirt/src/conf/nwfilter_params.c:390: var_assigned: Assigning: "varValue" = null return value from "virHashLookup". /libvirt/src/conf/nwfilter_params.c:392: dereference: Dereferencing a pointer that might be null "varValue" when calling "virNWFilterVarValueGetNthValue". /libvirt/src/conf/nwfilter_params.c:399: dereference: Dereferencing a pointer that might be null "tmp" when calling "virNWFilterVarValueGetNthValue".
-
由 Stefan Berger 提交于
This patch addresses the following coverity findings: /libvirt/src/conf/nwfilter_params.c:157: deref_parm: Directly dereferencing parameter "val". /libvirt/src/conf/nwfilter_params.c:473: negative_returns: Using variable "iterIndex" as an index to array "res->iter". /libvirt/src/nwfilter/nwfilter_ebiptables_driver.c:2891: unchecked_value: No check of the return value of "virAsprintf(&protostr, "-d 01:80:c2:00:00:00 ")". /libvirt/src/nwfilter/nwfilter_ebiptables_driver.c:2894: unchecked_value: No check of the return value of "virAsprintf(&protostr, "-p 0x%04x ", l3_protocols[protoidx].attr)". /libvirt/src/nwfilter/nwfilter_ebiptables_driver.c:3590: var_deref_op: Dereferencing null variable "inst".
-
由 Laine Stump 提交于
Some of the error messages in this function should have been virReportSystemError (since they have an errno they want to log), but were mistakenly written as netlinkError, which expects a libvirt error code instead. The result was that when one of the errors was encountered, "No error message provided" would be printed instead of something meaningful (see https://bugzilla.redhat.com/show_bug.cgi?id=816465 for an example).
-
- 27 4月, 2012 8 次提交
-
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
-
由 Jiri Denemark 提交于
Once qemu monitor reports migration has completed, we just closed our end of the pipe and let migration tunnel die. This generated bogus error in case we did so before the thread saw EOF on the pipe and migration was aborted even though it was in fact successful. With this patch we first wake up the tunnel thread and once it has read all data from the pipe and finished the stream we close the filedescriptor. A small additional bonus of this patch is that real errors reported inside qemuMigrationIOFunc are not overwritten by virStreamAbort any more.
-
由 Jiri Denemark 提交于
When QEMU reported failed or canceled migration, we correctly detected it but didn't really consider it as an error condition and migration protocol just went on. Luckily, some of the subsequent steps eventually failed end we reported an (unrelated and mostly random) error back to the caller.
-
由 Jiri Denemark 提交于
Currently, non-blocking calls are either sent immediately or discarded in case sending would block. This was implemented based on the assumption that the non-blocking keepalive call is not needed as there are other calls in the queue which would keep the connection alive. However, if those calls are no-reply calls (such as those carrying stream data), the remote party knows the connection is alive but since we don't get any reply from it, we think the connection is dead. This is most visible in tunnelled migration. If it happens to be longer than keepalive timeout (30s by default), it may be unexpectedly aborted because the connection is considered to be dead. With this patch, we only discard non-blocking calls when the last call with a thread is completed and thus there is no thread left to keep sending the remaining non-blocking calls.
-
由 Jiri Denemark 提交于
In some cases (spotted with broken connection during tunneled migration) we were overwriting the original error with worse or even misleading errors generated when we were cleaning up after failed migration.
-
由 Laine Stump 提交于
This patch resolves https://bugzilla.redhat.com/show_bug.cgi?id=815270 The function virNetDevMacVLanVPortProfileRegisterCallback() takes an arg "virtPortProfile", and was checking it for non-NULL before using it. However, the prototype for virNetDevMacVLanPortProfileRegisterCallback had marked that arg with ATTRIBUTE_NONNULL(). Contrary to what one may think, ATTRIBUTE_NONNULL() does not provide any guarantee that an arg marked as such really is always non-null; the only effect to the code generated by gcc, is that gcc *assumes* it is non-NULL; this results in, for example, the check for a non-NULL value being optimized out. (Unfortunately, this code removal only occurs when optimization is enabled, and I am in the habit of doing local builds with optimization off to ease debugging, so the bug didn't show up in my earlier local testing). In general, virPortProfile might always be NULL, so it shouldn't be marked as ATTRIBUTE_NONNULL. One other function prototype made this same error, so this patch fixes it as well.
-
由 Eric Blake 提交于
Commit 8fe455fd tried to work around a regression introduced in upstream gnulib that requires gettext 0.18 or newer on all projects using bootstrap, by making libvirt require gettext 0.18. But this fails on RHEL 6.2, which still ships gettext 0.17. Revert that change, and instead, import the latest round of gnulib updates that fix that problem properly. If you have already built in the window where libvirt required 0.18, be aware that incremental updates may run into problems: this is because 'autopoint --force' will not downgrade m4/po.m4 back to an older version, but it must be downgraded back to 0.17 levels to work with this patch. You may either manually remove that file then rerun bootstrap, or it may prove easier to just clean up all non-git files to start from a clean slate. * bootstrap.conf: Revert minimum gettext back to 0.17. * configure.ac: Likewise. * .gnulib: Update to latest, for bootstrap fixes. * bootstrap: Resync from gnulib.
-
- 26 4月, 2012 10 次提交
-
-
由 Hu Tao 提交于
-
由 Peter Krempa 提交于
Commit c9cd419c added copying of the makefile for translation files from gnulib. The makefile from gnulib is of version 0.18 but the build configuration cretes macros from version 0.17 which breaks the build with message: *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.17
-
由 Matthias Bolte 提交于
vboxArray is not castable to a COM item type. vboxArray is a wrapper around the XPCOM and MSCOM specific array handling. In this case we can avoid passing NULL as an empty array to IMachine::Delete by passing a dummy IMedium* array with a single NULL item.
-
由 Wen Congyang 提交于
commit 2223ea98 removes src/libvirt_dbus.syms, but it forgets to remove it from EXTRA_DIST. It will cause 'make dist' failed.
-
由 Matthias Bolte 提交于
virThreadSelf tries to access the virThreadPtr stored in TLS for the current thread via TlsGetValue. When virThreadSelf is called on a thread that was not created via virThreadCreate (e.g. the main thread) then TlsGetValue returns NULL as TlsAlloc initializes TLS slots to NULL. virThreadSelf can be called on the main thread via this call chain from virsh vshDeinit virEventAddTimeout virEventPollAddTimeout virEventPollInterruptLocked virThreadIsSelf triggering a segfault as virThreadSelf unconditionally dereferences the return value of TlsGetValue. Fix this by making virThreadSelf check the TLS slot value for NULL and setting the given virThreadPtr accordingly. Reported by Marcel Müller.
-
由 Ryan Woodsmall 提交于
Caused by commit 4445e16b that made the code used the connection private data pointer before it was initialized.
-
由 Guido Günther 提交于
-
由 Eric Blake 提交于
POSIX says that sa_sigaction is only safe to use if sa_flags includes SA_SIGINFO; conversely, sa_handler is only safe to use when flags excludes that bit. Gnulib doesn't guarantee an implementation of SA_SIGINFO, but does guarantee that if SA_SIGINFO is undefined, we can safely define it to 0 as long as we don't dereference the 2nd or 3rd argument of any handler otherwise registered via sa_sigaction. Based on a report by Wen Congyang. * src/rpc/virnetserver.c (SA_SIGINFO): Stub for mingw. (virNetServerSignalHandler): Avoid bogus dereference. (virNetServerFatalSignal, virNetServerNew): Set flags properly. (virNetServerAddSignalHandler): Drop unneeded #ifdef.
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=617711 reported that even with my recent patched to allow <memory unit='G'>1</memory>, people can still get away with trying <memory>1G</memory> and silently get <memory unit='KiB'>1</memory> instead. While virt-xml-validate catches the error, our C parser did not. Not to mention that it's always fun to fix bugs while reducing lines of code. :) * src/conf/domain_conf.c (virDomainParseMemory): Check for parse error. (virDomainDefParseXML): Avoid strtoll. * src/conf/storage_conf.c (virStorageDefParsePerms): Likewise. * src/util/xml.c (virXPathLongBase, virXPathULongBase) (virXPathULongLong, virXPathLongLong): Likewise.
-
由 Eric Blake 提交于
Commit 78345c68 makes at least gcc 4.1.2 on RHEL 5 complain: cc1: warnings being treated as errors In file included from vbox/vbox_V4_0.c:13: vbox/vbox_tmpl.c: In function 'vboxDomainUndefineFlags': vbox/vbox_tmpl.c:5298: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] * src/vbox/vbox_tmpl.c (vboxDomainUndefineFlags): Use union to avoid compiler warning.
-