- 26 1月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
On F16 at least, empty volume groups don't have a directory under /dev. The directory only appears once a logical volume is created. This tickles some behavior in BackendStablePath which ends with libvirt sleeping for 5 seconds while waiting for the directory to appear. This causes all sorts of problems for the virStorageVolLookupByPath API which virtinst uses, even if trying to resolve a path that is independent of the logical pool. In reality we don't even need to do that checking since logical pools always have a stable target path. Short circuit the polling in that case. Fixes bug 782261
-
- 25 1月, 2012 12 次提交
-
-
由 Eric Blake 提交于
Systemd detects containers based on whether they have an environment variable starting with 'container=lxc'; using a longer name fits the expectations, while also allowing detection of who created the container. Requested by Lennart Poettering, in response to https://bugs.freedesktop.org/show_bug.cgi?id=45175 * src/lxc/lxc_container.c (lxcContainerBuildInitCmd): Add another env-var.
-
由 Daniel P. Berrange 提交于
The current setup code for LXC is bind mounting /dev/pts/ptmx on top of a character device /dev/ptmx. This is denied by SELinux policy and is just wrong. The target of a bind mount should just be a plain file * src/lxc/lxc_container.c: Don't bind /dev/pts/ptmx onto a char device
-
由 Daniel P. Berrange 提交于
Add a virFileTouch API which ensures that a file will always exist, even if zero length * src/util/virfile.c, src/util/virfile.h, src/libvirt_private.syms: Introduce virFileTouch
-
由 Michal Privoznik 提交于
to cmdSnapshotCreate and cmdSnapshotCreateAs.
-
由 Michal Privoznik 提交于
With this flag, virDomainSnapshotCreate will use fs-freeze and fs-thaw guest agent commands to quiesce guest's disks.
-
由 Michal Privoznik 提交于
These functions simply issue command to guest agent which should freeze or unfreeze all file systems within guest.
-
由 Jiri Denemark 提交于
Direct boot (using kernel, initrd, and command line) is used by virt-install/virt-manager for network install. While any bootindex has no direct effect since -kernel is always first, we need it as a hint for SeaBIOS to present disks in the same order as they will be presented during normal boot.
-
由 Laine Stump 提交于
-
由 Eric Blake 提交于
It's better to group all the metadata together. This is a cosmetic output change; since the RNG allows interleave, it doesn't matter where the user stuck it on input, and an XPath query will find the same information when parsing the output. * src/conf/domain_conf.c (virDomainDefFormatInternal): Output metadata earlier. * docs/formatdomain.html.in: Update documentation. * tests/domainsnapshotxml2xmlout/metadata.xml: Update test. * tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml: Likewise.
-
由 Eric Blake 提交于
Noticed while reviewing the previous patch; thankfully, there are no violations. * cfg.mk (useless_free_options): Add xmlFreeNode.
-
由 Zeeshan Ali (Khattak) 提交于
Applications can now insert custom nodes and hierarchies into domain configuration XML. Although currently not enforced, applications are required to use their own namespaces on every custom node they insert, with only one top-level element per namespace.
-
由 Laszlo Ersek 提交于
POLLIN and POLLHUP are not mutually exclusive. Currently the following seems possible: the child writes 3K to its stdout or stderr pipe, and immediately closes it. We get POLLIN|POLLHUP (I'm not sure that's possible on Linux, but SUSv4 seems to allow it). We read 1K and throw away the rest. When poll() returns and we're about to check the /revents/ member in a given array element, let's map all the revents bits to two (independent) ideas: "let's attempt to read()", and "let's attempt to write()". This should cover all errors, EOFs, and normal conditions; the read()/write() call should report any pending error. Under this approach, both POLLHUP and POLLERR are mapped to "needs read()" if we're otherwise prepared for POLLIN. POLLERR also maps to "needs write()" if we're otherwise prepared for POLLOUT. The rest of the mappings (POLLPRI etc.) would be easy, but probably useless for pipes. Additionally, SUSv4 doesn't appear to forbid POLLIN|POLLERR (or POLLOUT|POLLERR) set simultaneously. One could argue that the read() or write() call would return without blocking in these cases (with an error), so POLLIN / POLLOUT would be justified beside POLLERR. The code now penalizes POLLIN|POLLERR differently from plain POLLERR. The former (ie. read() returning -1) is terminal and we jump to cleanup, while plain POLLERR masks only the affected file descriptor for the future. Let's unify those. Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
-
- 24 1月, 2012 8 次提交
-
-
由 Alon Levy 提交于
Signed-off-by: NAlon Levy <alevy@redhat.com>
-
由 Daniel P. Berrange 提交于
Extend the 'shutdown' and 'reboot' methods so that they both accept a new argument --mode acpi|agent * tools/virsh.c: New args for shutdown/reboot * tools/virsh.pod: Document new args
-
由 Daniel P. Berrange 提交于
This makes use of the QEMU guest agent to implement the virDomainShutdownFlags and virDomainReboot APIs. With no flags specified, it will prefer to use the agent, but fallback to ACPI. Explicit choice can be made by using a suitable flag * src/qemu/qemu_driver.c: Wire up use of agent
-
由 Daniel P. Berrange 提交于
Add a new API virDomainShutdownFlags and define: VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), Also define some flags for the reboot API VIR_DOMAIN_REBOOT_DEFAULT = 0, VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), Although these two APIs currently have the same flags, using separate enums allows them to expand separately in the future. Add stub impls of the new API for all existing drivers
-
由 Daniel P. Berrange 提交于
There is now a standard QEMU guest agent that can be installed and given a virtio serial channel <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> The protocol that runs over the guest agent is JSON based and very similar to the JSON monitor. We can't use exactly the same code because there are some odd differences in the way messages and errors are structured. The qemu_agent.c file is based on a combination and simplification of qemu_monitor.c and qemu_monitor_json.c * src/qemu/qemu_agent.c, src/qemu/qemu_agent.h: Support for talking to the agent for shutdown * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add thread helpers for talking to the agent * src/qemu/qemu_process.c: Connect to agent whenever starting a guest * src/qemu/qemu_monitor_json.c: Make variable static
-
由 Michal Privoznik 提交于
One of latest patches (b7bcb22c) enhanced testing for virHashEqual. However, hash2 variable might be used uninitialized.
-
由 Stefan Berger 提交于
Add a test case to test the virHashEqual function.
-
由 Stefan Berger 提交于
Add function to compare two hash tables for equality.
-
- 23 1月, 2012 2 次提交
-
-
由 Eric Blake 提交于
Since we already require the kernel to be new enough to support LO_FLAGS_AUTOCLEAR, we might as well also require glibc to be new enough to support epoll_create1(). * configure.ac (with_lxc): We require glibc 2.9 for LXC. Reported and tested by Philipp Hahn.
-
由 Guido Günther 提交于
by dereferencing a NULL pointer in the call to virNodeSuspendGetTargetMask.
-
- 21 1月, 2012 5 次提交
-
-
由 Guido Günther 提交于
-
由 Taku Izumi 提交于
Other virsh domifXXX commands can accept target name as a parameter to specify interface. From viewpoint of consistency, virsh domif-getlink command should accept target name as a parameter. This patch achieves this. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Eric Blake 提交于
Fix inconsistent whitespace and long lines. * src/qemu/qemu_capabilities.h (qemuCapsFlags): Improve formatting.
-
由 Eric Blake 提交于
When converting a linear enum to a string, we have checks in place in the VIR_ENUM_IMPL macro to ensure that there is one string for every value, which lets us quickly flag if a user added a value but forgot to add a counterpart string. However, this only works if we use the _LAST marker. * cfg.mk (sc_require_enum_last_marker): New syntax check. * src/conf/domain_conf.h (virDomainSnapshotState): Add new marker. * src/conf/domain_conf.c (virDomainSnapshotState): Fix offender. * src/qemu/qemu_monitor_json.c (qemuMonitorWatchdogAction) (qemuMonitorIOErrorAction, qemuMonitorGraphicsAddressFamily): Likewise. * src/util/virtypedparam.c (virTypedParameter): Likewise.
-
由 Eric Blake 提交于
Although this is a public API break, it only affects users that were compiling against *_LAST values, and can be trivially worked around without impacting compilation against older headers, by the user defining VIR_ENUM_SENTINELS before using libvirt.h. It is not an ABI break, since enum values do not appear as .so entry points. Meanwhile, it prevents users from using non-stable enum values without explicitly acknowledging the risk of doing so. See this list discussion: https://www.redhat.com/archives/libvir-list/2012-January/msg00804.html * include/libvirt/libvirt.h.in: Hide all sentinels behind LIBVIRT_ENUM_SENTINELS, and add missing sentinels. * src/internal.h (VIR_DEPRECATED): Allow inclusion after libvirt.h. (LIBVIRT_ENUM_SENTINELS): Expose sentinels internally. * daemon/libvirtd.h: Use the sentinels. * src/remote/remote_protocol.x (includes): Don't expose sentinels. * python/generator.py (enum): Likewise. * tests/cputest.c (cpuTestCompResStr): Silence compiler warning. * tools/virsh.c (vshDomainStateReasonToString) (vshDomainControlStateToString): Likewise.
-
- 20 1月, 2012 6 次提交
-
-
由 Eric Blake 提交于
While we still don't want to enable gcc's new -Wformat-literal warning, I found a rather easy case where the warning could be reduced, by getting rid of obsolete error-reporting practices. This is the last place where we were passing the (unused) net and conn arguments for constructing an error. * src/util/virterror_internal.h (virErrorMsg): Delete prototype. (virReportError): Delete macro. * src/util/virterror.c (virErrorMsg): Make static. * src/libvirt_private.syms (virterror_internal.h): Drop export. * src/util/conf.c (virConfError): Convert to macro. (virConfErrorHelper): New function, and adjust error calls. * src/xen/xen_hypervisor.c (virXenErrorFunc): Delete. (xenHypervisorGetSchedulerType) (xenHypervisorGetSchedulerParameters) (xenHypervisorSetSchedulerParameters) (xenHypervisorDomainBlockStats) (xenHypervisorDomainInterfaceStats) (xenHypervisorDomainGetOSType) (xenHypervisorNodeGetCellsFreeMemory, xenHypervisorGetVcpus): Update callers.
-
由 Eric Blake 提交于
Reusing common code makes things smaller; it also buys us some additional safety, such as now rejecting duplicate parameters during a set operation. * src/qemu/qemu_driver.c (qemuDomainSetBlkioParameters) (qemuDomainSetMemoryParameters, qemuDomainSetNumaParameters) (qemuSetSchedulerParametersFlags) (qemuDomainSetInterfaceParameters, qemuDomainSetBlockIoTune) (qemuDomainGetBlkioParameters, qemuDomainGetMemoryParameters) (qemuDomainGetNumaParameters, qemuGetSchedulerParametersFlags) (qemuDomainBlockStatsFlags, qemuDomainGetInterfaceParameters) (qemuDomainGetBlockIoTune): Use new helpers. * src/esx/esx_driver.c (esxDomainSetSchedulerParametersFlags) (esxDomainSetMemoryParameters) (esxDomainGetSchedulerParametersFlags) (esxDomainGetMemoryParameters): Likewise. * src/libxl/libxl_driver.c (libxlDomainSetSchedulerParametersFlags) (libxlDomainGetSchedulerParametersFlags): Likewise. * src/lxc/lxc_driver.c (lxcDomainSetMemoryParameters) (lxcSetSchedulerParametersFlags, lxcDomainSetBlkioParameters) (lxcDomainGetMemoryParameters, lxcGetSchedulerParametersFlags) (lxcDomainGetBlkioParameters): Likewise. * src/test/test_driver.c (testDomainSetSchedulerParamsFlags) (testDomainGetSchedulerParamsFlags): Likewise. * src/xen/xen_hypervisor.c (xenHypervisorSetSchedulerParameters) (xenHypervisorGetSchedulerParameters): Likewise.
-
由 Eric Blake 提交于
Preparation for another patch that refactors common patterns into the new file for fewer lines of code overall. * src/util/util.h (virTypedParameterArrayClear): Move... * src/util/virtypedparam.h: ...to new file. (virTypedParameterArrayValidate, virTypedParameterAssign): New prototypes. * src/util/util.c (virTypedParameterArrayClear): Likewise. * src/util/virtypedparam.c: New file. * po/POTFILES.in: Mark file for translation. * src/Makefile.am (UTIL_SOURCES): Build it. * src/libvirt_private.syms (util.h): Split... (virtypedparam.h): to new section. (virkeycode.h): Sort. * daemon/remote.c: Adjust callers. * tools/virsh.c: Likewise.
-
由 Eric Blake 提交于
Based on qemu changes made in commits ae523427 and 659ded58. * src/lxc/lxc_driver.c (lxcSetSchedulerParametersFlags) (lxcGetSchedulerParametersFlags, lxcDomainSetBlkioParameters) (lxcDomainGetBlkioParameters): Use helpers. (lxcDomainSetBlkioParameters): Allow setting live and config at once.
-
由 Eric Blake 提交于
Gnulib claims that there are some classes of warnings that are worth enabling during development, but where silencing those warnings causes code bloat that is not necessary in an optimized build. The code bloat to silence the warnings is only enabled by -Dlint. Follow the lead of coreutils in setting up -Dlint whenever full warnings are requested. * m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Add -Dlint, and move _FORTIFY_SOURCE to config.h instead of CFLAGS.
-
由 Eric Blake 提交于
We had a memory leak on a very arcane OOM situation (unlikely to ever hit in practice, but who knows if libvirt.so would ever be linked into some other program that exhausts all thread-local storage keys?). I found it by code inspection, while analyzing a valgrind report generated by Alex Jia. * src/util/threads.h (virThreadLocalSet): Alter signature. * src/util/threads-pthread.c (virThreadHelper): Reduce allocation lifetime. (virThreadLocalSet): Detect failure. * src/util/threads-win32.c (virThreadLocalSet): Likewise. (virCondWait): Fix caller. * src/util/virterror.c (virLastErrorObject): Likewise.
-
- 19 1月, 2012 6 次提交
-
-
由 Daniel P. Berrange 提交于
The RPC generator transforms methods matching certain patterns like 'id' or 'uuid', etc but does not anchor its matches to the end of the word. So if a method contains 'id' in the middle (eg virIdentity) then the RPC generator munges that. * src/rpc/gendispatch.pl: Anchor matches
-
由 Daniel P. Berrange 提交于
To avoid a namespace clash with forthcoming identity APIs, rename the virNet*GetLocalIdentity() APIs to have the form virNet*GetUNIXIdentity() * daemon/remote.c, src/libvirt_private.syms: Update for renamed APIs * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h, src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: s/LocalIdentity/UNIXIdentity/
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
* daemon/remote.c: remoteSASLFinish called the method virNetSASLSessionGetIdentity twice, remove second call
-
由 Daniel P. Berrange 提交于
* daemon/remote.c, src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h, src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add gid parameter
-
由 Martin Kletzander 提交于
There was missing capability for blkiotune and thus specifying these settings caused libvirt to run qemu with invalid parameters and then reporting qemu error instead of the standard libvirt one. The support for blkiotune setting was added in upstream qemu repo under commit 0563e191516289c9d2f282a8c50f2eecef2fa773.
-