- 02 4月, 2012 2 次提交
-
-
由 Yuri Chornoivan 提交于
-
由 Laine Stump 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=808979 The leak is really in virProcessInfoGetAffinity, as shown in the valgrind output given in the above bug report - it calls CPU_ALLOC(), but then fails to call CPU_FREE(). This leak has existed in every version of libvirt since 0.7.5.
-
- 31 3月, 2012 12 次提交
-
-
由 Eric Blake 提交于
Commit 1b1402b9 introduced a regression. Since older libvirt versions would silently round memory up (until the previous patch), but populated current memory based on querying the guest, it was possible to have dumpxml show cur > max by the amount of the rounding. For example, if a user requested 1048570 KiB memory (just shy of 1GiB), the qemu driver would actually run with 1048576 KiB, and libvirt 0.9.10 would output a current that was 6KiB larger than the maximum. Situations where this could have an impact include, but are not limited to, migration from old to new libvirt, managedsave in old libvirt and start in new libvirt, snapshot creation in old libvirt and revert in new libvirt - without this patch, the new libvirt would reject the VM because of the rounding discrepancy. Fix things by adding a fuzz factor, and silently clamp current down to maximum in that case, rather than failing to reparse XML for an existing VM. From a practical standpoint, this has no user impact: 'virsh dumpxml' will continue to query the running guest rather than rely on the incoming xml, which will see the currect current value, and even if clamping down occurs during parsing, it will be by at most the fuzz factor of a megabyte alignment, and rounded back up when passed back to the hypervisor. Meanwhile, we continue to reject cur > max if the difference is beyond the fuzz factor of nearest megabyte. But this is not a real change in behavior, since with 0.9.10, even though the parser allowed it, later in the processing stream we would reject it at the qemu layer; so rejecting it in the parser just moves error detection to a nicer place. * src/conf/domain_conf.c (virDomainDefParseXML): Don't reject existing XML. Based on a report by Zhou Peng.
-
由 Eric Blake 提交于
If we round up a user's memory request, we should update the XML to reflect the actual value in use by the VM, rather than giving an artificially small value back to the user. * src/qemu/qemu_command.c (qemuBuildNumaArgStr) (qemuBuildCommandLine): Reflect rounding back to XML.
-
由 Eric Blake 提交于
Laszlo Ersek pointed out that in trying to convert a long to an unsigned int, we used: long long_val = ...; if ((unsigned int)long_val == long_val) According to C99 integer promotion rules, the if statement is equivalent to: (unsigned long)(unsigned int)long_val == (unsigned long)long_val since you get an unsigned comparison if at least one side is unsigned, using the largest rank of the two sides; but on 32-bit platforms, where unsigned long and unsigned int are the same size, this comparison is always true and ends up converting negative long_val into posigive unsigned int values, rather than rejecting the negative value as we had originally intended (python longs are unbounded size, and we don't want to do silent modulo arithmetic when converting to C code). Fix this by using direct comparisons, rather than casting. * python/typewrappers.c (libvirt_intUnwrap, libvirt_uintUnwrap) (libvirt_ulongUnwrap, libvirt_ulonglongUnwrap): Fix conversion checks.
-
由 Daniel P. Berrange 提交于
* libvirt.spec.in: Remove obsolete --with-remote-pid-file arg. Add missing %{without_libxl} statement. Fix handling of docs in client only build. Put systemtap files in -client RPM instead of -daemon RPM * examples/xml/nwfilter/Makefile.am: Don't install examples if nwfilter is disabled.
-
由 Daniel P. Berrange 提交于
There are a number of flaws with our packaging of the libvirtd daemon: - Installing 'libvirt' does not install 'qemu-kvm' or 'xen' etc which are required to actually run the hypervisor in question - Installing 'libvirt' pulls in the default configuration files which may not be wanted & cause problems if installed inside a guest - It is not possible to explicitly required all the peices required to manage a specific hypervisor This change takes the 'libvirt' RPM and and changes it thus - libvirt: just a virtual package with dep on libvirt-daemon, libvirt-daemon-config-network & libvirt-daemon-config-nwfilter - libvirt-daemon: the libvirt daemon and related pieces - libvirt-daemon-config-network: the default network config - libvirt-daemon-config-nwfilter: the network filter configs - libvirt-docs: the website HTML We then introduce some more virtual (empty) packages - libvirt-daemon-qemu: Deps on libvirt-daemon & 'qemu' - libvirt-daemon-kvm: Deps on libvirt-daemon & 'qemu-kvm' - libvirt-daemon-lxc: Deps on libvirt-daemon - libvirt-daemon-uml: Deps on libvirt-daemon - libvirt-daemon-xen: Deps on libvirt-daemon & 'xen' - libvirt-qemu: Deps on libvirt-daemon-qemu & libvirt-daemon-config-{network,nwfilter} - libvirt-kvm: Deps on libvirt-daemon-kvm & libvirt-daemon-config-{network,nwfilter} - libvirt-lxc: Deps on libvirt-daemon-lxc & libvirt-daemon-config-{network,nwfilter} - libvirt-uml: Deps on libvirt-daemon-uml & libvirt-daemon-config-{network,nwfilter} - libvirt-xen: Deps on libvirt-daemon-xen & libvirt-daemon-config-network My intent in the future is to turn on the driver modules by default, at which time 'libvirt-daemon' will cease to include any specific drivers, instead we'll get libvirt-daemon-driver-XXXX packages for each driver. The libvirt-daemon-XXX packages will then pull in each driver that they require. It is recommended that applications required a locally installed libvirtd daemon, use either 'Requires: libvirt-daemon-XXXX' or 'Requires: libvirt-XXX' and *not* "Requires: libvirt-daemon" or 'Requires: libvirt' * libvirt.spec.in: Refactor RPMs * docs/packaging.html.in, docs/sitemap.html.in: Document new RPM split rationale
-
由 Hendrik Schwartke 提交于
This patch was created to resolve this upstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=784767 and is at least a partial solution to this RHEL RFE: https://bugzilla.redhat.com/show_bug.cgi?id=805071 Previously the only attribute of a network device that could be modified by virUpdateDeviceFlags() ("virsh update-device") was the link state; attempts to change any other attribute would log an error and fail. This patch adds recognition of a change in bridge device name, and supports reconnecting the guest's interface to the new device. Standard audit logs for detaching and attaching a network device are also generated. Although the current auditing function doesn't log the bridge being attached to, this will later be changed in a separate patch.
-
由 Eric Blake 提交于
Regression introduced when we changed types in commit 3e2c3d8f. We've done this sort of cleanup before (see commit c685993d). * src/conf/storage_conf.c (virStoragePoolDefFormat) (virStorageVolTargetDefFormat): Cast gid_t and uid_t.
-
由 Eric Blake 提交于
We are so close to a release that we don't want to pull in a gnulib submodule update and risk regressions, since there has been a lot of other gnulib churn upstream. However, there are a couple of gnulib issues that are worth fixing in isolation, by applying local patches to gnulib. There was an upstream gnulib bug in maint.mk that rendered most of our syntax checks ineffective (and fixing it flushed out a minor bug in our code): https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00194.html There is still an upstream bug where gnulib uses the wrong type for ssize_t on mingw; we need the fix now even though it has not yet been accepted into gnulib: https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00188.html * gnulib/local/top/maint.mk.diff: Pick up upstream gnulib maint.mk. * gnulib/local/m4/ssize_t.m4.diff: Work around gnulib bug. * src/libvirt.c: Remove unused header. * cfg.mk (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF): Exempt gnulib local files.
-
由 Laine Stump 提交于
qemuBuildHostNetStr had a switch-within-a-switch where both were looking at the same variable. This was apparently to take advantage of code common to three different cases (while also taking care of some code that was different). However, there were only 2 lines common to all, one of those can be eliminated by merging it into the virAsprintfs that are in each case. On top of that, all the extra empty cases cause Coverity complaints (because they are unreachable), but absence of the empty cases causes a compile error due to "enumeration value not handled in switch". The solution is to just make each toplevel case independent, folding in the common code to each.
-
由 Laine Stump 提交于
This patch reverts commit b0e2bb33. Its functionality has been replaced by commit 3269ee65.
-
由 Laine Stump 提交于
commit b0e2bb33 set a default value for the SPICE agent channel by inserting it during parsing of the channel XML. That method of setting a default is problematic because it makes a format/parse roundtrip unclean, and experience with setting other values as a side effect of parsing has led to headaches (e.g. automatically setting a MAC address in the parser when one isn't specified in the input XML). This patch does not revert commit b0e2bb33 (it will be reverted in a separate patch) but adds the alternate implementation of simply inserting the default value in the appropriate place on the qemu commandline when no value is provided.
-
由 Michal Privoznik 提交于
If we issue guest command and GA is not running, the issuing thread will block endlessly. We can check for GA presence by issuing guest-sync with unique ID (timestamp). We don't want to issue real command as even if GA is not running, once it is started, it process all commands written to GA socket.
-
- 30 3月, 2012 10 次提交
-
-
由 Michal Privoznik 提交于
With latest gnulib we are checking even the lowest level functions whether they check flags. Moreover, we are shadowing the real error on system without TUNSETIFF support.
-
由 Daniel P. Berrange 提交于
* src/remote/remote_driver.c: s/sizeof(ret)2/sizeof(ret2)/
-
由 Daniel P. Berrange 提交于
The code is splattered with a mix of sizeof foo sizeof (foo) sizeof(foo) Standardize on sizeof(foo) and add a syntax check rule to enforce it Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The commandhelper.c & ssh.c programs rely on various APIs not present on Win32. Disable them, since the tests that uses these helpers are already disabled * tests/commandhelper.c, tests/ssh.c: Disable on WIN32 Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Defining an enum with names like "ERROR" causes a world of hurt on Win32 whose headers have such symbol names already * tests/cputest.c: Remove redefinition of CPU constants Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
A handful of places used %zd for format specifiers even though the args was size_t, not ssize_t. * src/remote/remote_driver.c, src/util/xml.c: s/%zd/%zu/ Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Alex Jia 提交于
* src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): avoid crashing libvirtd due to derefing a NULL pointer. For details, please see bug: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=808371Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Wen Congyang 提交于
When qemu cannot start, we may call qemuProcessStop() twice. We have check whether the vm is running at the beginning of qemuProcessStop() to avoid libvirt deadlock. We call qemuProcessStop() with driver and vm locked. It seems that we can avoid libvirt deadlock. But unfortunately we may unlock driver and vm in the function qemuProcessKill() while vm->def->id is not -1. So qemuProcessStop() will be run twice, and monitor will be freed unexpectedly. So we should set vm->def->id to -1 at the beginning of qemuProcessStop().
-
由 Eric Blake 提交于
An upstream gnulib bug[1] meant that some of our syntax checks weren't being run. Fix up our offenders before we upgrade to a newer gnulib. [1] https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00194.html * src/util/virnetdevtap.c (virNetDevTapCreate): Use flags. * tests/lxcxml2xmltest.c (mymain): Strip useless ().
-
由 Eric Blake 提交于
Commit 21b5daa1 was the last time we cleaned this up. * tools/virt-host-validate-common.c (virHostValidateDevice): Rename local variable.
-
- 29 3月, 2012 3 次提交
-
-
由 Zhou Peng 提交于
virNetDevMacVLanRestartWithVPortProfile is omitted in src/libvirt_private.syms, which causes link err.
-
由 Christian Benvenuti 提交于
In the current V3 migration protocol, Libvirt does not check the result of the function qemuMigrationVPAssociatePortProfiles This means that it is possible for a migration to complete successfully even when the VM loses network connectivity on the destination host. With this change libvirt aborts the migration (during the "finish" step) when the above function fails, that is to say when at least one of the port profile associations fails. Signed-off by: Christian Benvenuti <benve@cisco.com>
-
由 Christophe Fergeau 提交于
libvirt documentation for channels with type 'spicevmc' says that the 'target' child node has: "an optional attribute name controls how the guest will have access to the channel, and defaults to name='com.redhat.spice.0'." However, this default value is never set in libvirt code base, there's only a check in qemu_command.c to error out if the name attribute doesn't have the expected value (if it's set). This commit sets a default target name for spicevmc channels during the domain configuration parsing so that the code agrees with the documentation.
-
- 28 3月, 2012 6 次提交
-
-
由 Alex Jia 提交于
Leaks are introduced in commit 1cf0e3db and fe383bb5. Fixing memory leaks, in addition, the patch also fixes a potential missing return value issue in 'if (from)' statement, without the fixing, although the programming met a error, the subsequent codes will be executed continually. * tools/virsh.c (cmdSnapshotList): fix memory leaks and missing return value. * How to reproduce? % virsh snapshot-list <domain> --parent --roots % virsh snapshot-list <domain> --parent --tree % virsh snapshot-list <domain> --roots --tree actual result: error: --parent and --roots are mutually exclusive error: Failed to disconnect from the hypervisor, 1 leaked reference(s) error: --parent and --tree are mutually exclusive error: Failed to disconnect from the hypervisor, 1 leaked reference(s) error: --roots and --tree are mutually exclusive error: Failed to disconnect from the hypervisor, 1 leaked reference(s) % virsh snapshot-create-as <domain> --name "hello" % virsh snapshot-create-as <domain> --name "libvirt" % virsh snapshot-list <domain> --roots --from "hello" actual result: error: --roots and --from are mutually exclusive Name Creation Time State ------------------------------------------------------------ libvirt 2012-03-28 13:46:51 +0800 running Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Guannan Ren 提交于
*setPyVirTypedParameter *libvirt_virDomainGetCPUStats
-
由 Guannan Ren 提交于
int libvirt_intUnwrap(PyObject *obj, int *val); int libvirt_uintUnwrap(PyObject *obj, unsigned int *val); int libvirt_longUnwrap(PyObject *obj, long *val); int libvirt_ulongUnwrap(PyObject *obj, unsigned long *val); int libvirt_longlongUnwrap(PyObject *obj, long long *val); int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val); int libvirt_doubleUnwrap(PyObject *obj, double *val); int libvirt_boolUnwrap(PyObject *obj, bool *val);
-
由 Eric Blake 提交于
Commit d42a2ffc forgot to touch up virsh documentation, and commit 4e9953a4 mis-spelled the option name. * tools/virsh.pod (snapshot-create, snapshot-create-as): Fix typo and match recent change in flag meaning.
-
由 Daniel P. Berrange 提交于
Given that we auto-detect whether each -Wxxxx flag is supported by GCC, and we are warning-free and use automake silent rules, there is no compelling reason to allow compile warnings to be disabled. Replace the --enable-compile-warnings flag with a simpler --enable-werror flag, which defaults to 'yes' if building from GIT, or 'no' if building from tar.gz This helps ensure that everyone writing patches for libvirt will take care to fix their warning problems before submitting for review * autobuild.sh: Force -Werror * configure.ac: Update for LIBVIRT_COMPILE_WARNINGS macro change * m4/virt-compile-warnings.m4: Permanently enable all warnings, auto-enable Werror for GIT builds
-
由 Daniel P. Berrange 提交于
Add a new flag '--with-test-suite' to configure to control whether the test suite binaries are built by default. ie built with a plain 'make', as opposed to delayed until 'make check' For builds from tar.gz tests will not be built by default. For builds from GIT, tests with be on by default, to try and ensure that patch developers don't accidentally break the test suites without noticing. * configure.ac: Add --with-test-suite * tests/Makefile.am: Use noinst_PROGRAMS instead of check_PROGRAMS if building tests by default. Consolidate setting of TESTS and {noinst,check}_PROGRAMS to avoid duplication
-
- 27 3月, 2012 7 次提交
-
-
由 Stef Walter 提交于
* Don't advertise information on the network without consent of the user, either through manual configuration, or a user interface that drives this option. * Since libvirtd must be configured for network access anyway (for all but ssh), this setting was not useful "out of the box", so changing this default setting does not remove "out of the box" functionality.
-
由 Eric Blake 提交于
Commit d42a2ffc caused a regression in creating a disk-only snapshot of a qcow2 disk; by passing the wrong variable to the monitor call, libvirt ended up creating JSON that looked like "format":null instead of the intended "format":"qcow2". To make it easier to diagnose this in the future, make JSON creation error out if "s:arg" is paired with NULL (it is still possible to use "n:arg" in the rare cases where qemu will accept a null). * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateSingleDiskActive): Pass correct value. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONMakeCommandRaw): Improve error message.
-
由 Daniel P. Berrange 提交于
* docs/schemas/domaincommon.rng: Add missing lxc & openvz console target types. Allow arch on LXC <os> type element * tests/domainschematest: Include tests/lxcxml2xmldata/
-
由 Daniel P. Berrange 提交于
Pass argv to the init binary of LXC, using a new <initarg> element. * docs/formatdomain.html.in: Document <os> usage for containers * docs/schemas/domaincommon.rng: Add <initarg> element * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing and formatting of <initarg> * src/lxc/lxc_container.c: Setup LXC argv * tests/Makefile.am, tests/lxcxml2xmldata/lxc-systemd.xml, tests/lxcxml2xmltest.c, tests/testutilslxc.c, tests/testutilslxc.h: Test parsing/formatting of LXC related XML parts
-
由 Daniel P. Berrange 提交于
The SELinux mount point moved from /selinux to /sys/fs/selinux when systemd came along. * configure.ac: Probe for SELinux mount point * src/lxc/lxc_container.c: Use SELinux mount point determined by configure.ac
-
由 Daniel P. Berrange 提交于
-
由 D. Herrendoerfer 提交于
When libvirtd is restarted, also restart the netlink event message callbacks for existing VEPA connections and send a message to lldpad for these existing links, so it learns the new libvirtd pid. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-