- 23 3月, 2012 15 次提交
-
-
由 Daniel P. Berrange 提交于
* src/util/virauth.c, src/util/virauth.h: Add virAuthGetConfigFilePath * include/libvirt/virterror.h, src/util/virterror.c: Add VIR_FROM_AUTH error domain Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Ensure that the functions in virauth.h have names matching the file prefix, by renaming virRequest{Username,Password} to virAuthGet{Username,Password} Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To follow latest naming conventions, rename src/util/authhelper.[ch] to src/util/virauth.[ch]. * src/util/authhelper.[ch]: Rename to src/util/virauth.[ch] * src/esx/esx_driver.c, src/hyperv/hyperv_driver.c, src/phyp/phyp_driver.c, src/xenapi/xenapi_driver.c: Update for renamed include files Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The '.ini' file format is a useful alternative to the existing config file style, when you need to have config files which are hashes of hashes. The 'virKeyFilePtr' object provides a way to parse these file types. * src/Makefile.am, src/util/virkeyfile.c, src/util/virkeyfile.h: Add .ini file parser * tests/Makefile.am, tests/virkeyfiletest.c: Test basic parsing capabilities Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Convert drivers currently using the qparams APIs, to instead use the virURIPtr query parameters directly. * src/esx/esx_util.c, src/hyperv/hyperv_util.c, src/remote/remote_driver.c, src/xenapi/xenapi_utils.c: Remove use of qparams * src/util/qparams.h, src/util/qparams.c: Delete * src/Makefile.am, src/libvirt_private.syms: Remove qparams Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Avoid the need for each driver to parse query parameters itself by storing them directly in the virURIPtr struct. The parsing code is a copy of that from src/util/qparams.c The latter will be removed in a later patch * src/util/viruri.h: Add query params to virURIPtr * src/util/viruri.c: Parse query parameters when creating virURIPtr * tests/viruritest.c: Expand test to cover params Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Instead of just typedef'ing the xmlURIPtr struct for virURIPtr, use a custom libvirt struct. This allows us to fix various problems with libxml2. This initially just fixes the query vs query_raw handling problems. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Move error reporting out of the callers, into virURIParse and virURIFormat, to get consistency. * include/libvirt/virterror.h, src/util/virterror.c: Add VIR_FROM_URI * src/util/viruri.c, src/util/viruri.h: Add error reporting * src/esx/esx_driver.c, src/libvirt.c, src/libxl/libxl_driver.c, src/lxc/lxc_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/qemu/qemu_migration.c, src/remote/remote_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/vmx/vmx.c, src/xen/xen_driver.c, src/xen/xend_internal.c, tests/viruritest.c: Remove error reporting Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The parameter in the virURIFormat impl mistakenly used the xmlURIPtr type, instead of virURIPtr. Since they will soon cease to be identical, this needs fixing Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Since we defined a custom virURIPtr type, we should use a virURIFree method instead of assuming it will always be a typedef for xmlURIPtr * src/util/viruri.c, src/util/viruri.h, src/libvirt_private.syms: Add a virURIFree method * src/datatypes.c, src/esx/esx_driver.c, src/libvirt.c, src/qemu/qemu_migration.c, src/vmx/vmx.c, src/xen/xend_internal.c, tests/viruritest.c: s/xmlFreeURI/virURIFree/ Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
To ensure we properly escape & unescape IPv6 numeric addresses, add a test case * tests/Makefile.am, tests/viruritest.c: URI parsing test Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently the libvirt.service unit file for systemd does not specify any kill mode. So systemd kills off every process inside its cgroup. ie all dnsmasq processes, all virtual machines. This obviously not what we want. Set KillMode=process so that it only kills the top level process of libvirtd * daemon/libvirtd.service.in: Add KillMode=process Reported-By: NMark McLoughlin <markmc@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Dave Allan 提交于
-
由 Zhou Peng 提交于
Bogus <code/>, and incorrect use of it's instead of its.
-
由 Dave Allan 提交于
virsh.pod had several instances in which it referred to "the documentation" which was a little puzzling to me since it is documentation. Reading the document from end to end makes it clear that it means a specific URI which was noted previously in the text, but I had never noticed those URIs in several years of referring to the man page. This patch adds those URIs to several additional places in the text.
-
- 22 3月, 2012 9 次提交
-
-
由 Guannan Ren 提交于
dom.getCPUStats(True, 0) [{'cpu_time': 24699446159L, 'system_time': 10870000000L, 'user_time': 950000000L}] dom.getCPUStats(False, 0) [{'cpu_time': 8535292289L}, {'cpu_time': 1005395355L}, {'cpu_time': 9351766377L}, {'cpu_time': 5813545649L}] *generator.py Add a new naming rule *libvirt-override-api.xml The API function description *libvirt-override.c Implement it.
-
由 Alex Jia 提交于
Detected by valgrind. Leaks are introduced in commit 49556023. * python/libvirt-override.c (libvirt_virNodeGetCPUStats): fix memory leaks and improve codes return value. For details, please see the following link: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770943Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Eric Blake 提交于
On machines with massive amounts of CPUs, the gnulib 'test-lock' could take minutes, or even appear to deadlock, because of poor scaling of timing interactions between multiple cores. See https://bugzilla.redhat.com/show_bug.cgi?id=797284. For precedence, note that iwhd has done the same: https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00311.html We can re-enable things if gnulib ever analyzes and improves the situation. * bootstrap.conf (gnulib_tool_option_extras): Avoid lock-tests.
-
由 Jiri Denemark 提交于
When a client which started non-p2p migration dies in a bad time, the source libvirtd never clears the migration job and almost nothing can be done with the domain without restarting the daemon. This patch makes use of connection close callbacks and ensures that migration job is properly discarded when the client disconnects.
-
由 Jiri Denemark 提交于
-
由 Jiri Denemark 提交于
Add support for registering arbitrary callback to be called for a domain when a connection gets closed.
-
由 Jiri Denemark 提交于
Destination daemon should not rely on the client or source daemon (depending on the type of migration) to call Finish when migration fails, because the client may crash before it can do so. The domain prepared for incoming migration is set to be destroyed (and migration job cleaned up) when connection with the client closes but this is not enough. If the associated qemu process crashes after Prepare step and the domain is cleaned up before the connection gets closed, autodestroy is not called for the domain and migration jobs remains set. In case the domain is defined on destination host (i.e., it is not completely removed once destroyed) we keep the job set for ever. To fix this, we register a cleanup callback which is responsible to clean migration-in job when a domain dies anywhere between Prepare and Finish steps. Note that we can't blindly clean any job when spotting EOF on monitor since normally an API is running at that time.
-
由 Jiri Denemark 提交于
Add support for registering cleanup callbacks to be run when a domain transitions to shutoff state.
-
由 Jiri Denemark 提交于
This reverts commit 61f2b6ba and most of commit d8916dc8, which effectively brings back commit ef1065cf written by Jim Fehlig: The qemu migration speed default is 32MiB/s as defined in migration.c /* Migration speed throttling */ static int64_t max_throttle = (32 << 20); There's no need to throttle migration when targeting a file, so set migration speed to unlimited prior to migration, and restore to libvirt default value after migration. Default units is MB for migrate_set_speed monitor command, so (INT64_MAX / (1024 * 1024)) is used for unlimited migration speed. This was reverted because migration to file could not be canceled and even monitored since qemu was not processing any monitor commands until the migration finished. This is now different as we make sure the file descriptor we pass to qemu is able to properly report EAGAIN. Recent qemu changes might have helped as well. I tested managedsave with this patch in and indeed, it is 10x faster while I can still monitor its progress.
-
- 21 3月, 2012 2 次提交
-
-
由 Alex Jia 提交于
Detected by valgrind. Leaks are introduced in commit 17c77955. * python/libvirt-override.c (libvirt_virNodeGetMemoryStats): fix memory leaks and improve codes return value. For details, please see the following link: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=770944Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Eric Blake 提交于
On RHEL 5.7, I got this compilation failure: In file included from /usr/include/python2.4/pyport.h:98, from /usr/include/python2.4/Python.h:55, from libvirt.c:3: ../gnulib/lib/time.h:468: error: expected ';', ',' or ')' before '__timer' Turns out that our '#define restrict __restrict' from config.h wasn't being picked up. Gnulib _requires_ that all .c files include <config.h> first, otherwise the gnulib header overrides tend to misbehave. Problem introduced by patch c700613b. * python/generator.py (buildStubs): Include <config.h> first.
-
- 20 3月, 2012 6 次提交
-
-
由 Martin Kletzander 提交于
End tag for "host" element was missing in example configuration
-
由 Laine Stump 提交于
A few times libvirt users manually setting mac addresses have complained of a networking failure that ends up being due to a multicast mac address being used for a guest interface. This patch prevents that by logging an error and failing if a multicast mac address is encountered in each of the three following cases: 1) domain xml <interface> mac address. 2) network xml bridge mac address. 3) network xml dhcp/host mac address. There are several other places where a mac address can be input that aren't controlled in this manner because failure to do so has no consequences (e.g., if the address will be used to search through existing interfaces for a match). The RNG has been updated to add multiMacAddr and uniMacAddr along with the existing macAddr, and macAddr was switched to uniMacAddr where appropriate.
-
由 Laine Stump 提交于
If an error was encountered parsing a dhcp host entry mac address or name, parsing would continue and log a less descriptive error that might make it more difficult to notice the true nature of the problem. This patch returns immediately on logging the first error.
-
由 Laine Stump 提交于
This patch is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=798467 If a guest's tap device is created using the same MAC address the guest uses for its own network card (which connects to the tap device), the Linux kernel will log the following message and traffic will not pass: kernel: vnet9: received packet with own address as source address This patch disallows MAC addresses with a first byte of 0xFE, but only in the case that the MAC address is used for a guest interface that's connected by way of a standard tap device. (In other words, the validation is done at runtime at the same place the MAC address is modified for the tap device, rather than when mac address is parsed, the idea being that it is then we know for sure the address will be problematic.)
-
由 Martin Kletzander 提交于
Using inheritance, this patch cleans up the cpu_map.xml file and also sorts all CPU features according to the feature and registry values. Model features are sorted the same way as foeatures in the specification. Also few models that are related were organized together and parts of the XML are marked with comments
-
由 Eric Blake 提交于
If a guest is paused, we were silently ignoring the quiesce flag, which results in unclean snapshots, contrary to the intent of the flag. Since we can't quiesce without guest agent support, we should instead fail if the guest is not running. Meanwhile, if we attempt a quiesce command, but the guest agent doesn't respond, and we time out, we may have left the command pending on the guest's queue, and when the guest resumes parsing commands, it will freeze even though our command is no longer around to issue a thaw. To be safe, we must _always_ pair every quiesce call with a counterpart thaw, even if the quiesce call failed due to a timeout, so that if a guest wakes up and starts processing a command backlog, it will not get stuck in a frozen state. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateDiskActive): Always issue thaw after a quiesce, even if quiesce failed. (qemuDomainSnapshotFSThaw): Add a parameter.
-
- 19 3月, 2012 1 次提交
-
-
由 Martin Kletzander 提交于
This patch fixes a NULL pointer check that was causing SegFault on some specific configurations. It also reverts commit 59d0c980 that was checking for this value in one place.
-
- 17 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Commit af3f9aab taught 'virsh help' to ignore command aliases, but forgot 'virsh -h'. * tools/virsh.c (vshUsage): Handle aliases.
-
- 16 3月, 2012 6 次提交
-
-
由 Daniel P. Berrange 提交于
A common coding pattern for changing blkio parameters is 1. virDomainGetBlkioParameters 2. change one or more params 3. virDomainSetBlkioParameters For this to work, it must be possible to roundtrip through the methods without error. Unfortunately virDomainGetBlkioParameters will return "" for the deviceWeight parameter for guests by default, which virDomainSetBlkioParameters will then reject as invalid. This fixes the handling of "" to be a no-op, and also improves the error message to tell you what was invalid
-
由 Osier Yang 提交于
How to reproduce: % valgrind -v --leak-check=full virsh migrate mig \ qemu+ssh://$dest/system --unsafe == 8 bytes in 1 blocks are definitely lost in loss record 1 of 28 == at 0x4A04A28: calloc (vg_replace_malloc.c:467) == by 0x3EB7115FB8: xdr_reference (in /lib64/libc-2.12.so) == by 0x3EB7115F10: xdr_pointer (in /lib64/libc-2.12.so) == by 0x4D1EA84: xdr_remote_string (remote_protocol.c:40) == by 0x4D1EAD8: xdr_remote_domain_migrate_prepare3_ret (remote_protocol.c:4772) == by 0x4D2FFD2: virNetMessageDecodePayload (virnetmessage.c:382) == by 0x4D2789C: virNetClientProgramCall (virnetclientprogram.c:382) == by 0x4D0707D: callWithFD (remote_driver.c:4549) == by 0x4D070FB: call (remote_driver.c:4570) == by 0x4D12AEE: remoteDomainMigratePrepare3 (remote_driver.c:4138) == by 0x4CF7BE9: virDomainMigrateVersion3 (libvirt.c:4815) == by 0x4CF9432: virDomainMigrate2 (libvirt.c:5454) == == LEAK SUMMARY: == definitely lost: 8 bytes in 1 blocks == indirectly lost: 0 bytes in 0 blocks == possibly lost: 0 bytes in 0 blocks == still reachable: 126,995 bytes in 1,343 blocks == suppressed: 0 bytes in 0 blocks This patch also fixes the leaks in remoteDomainMigratePrepare and remoteDomainMigratePrepare2.
-
由 Alex Jia 提交于
* src/libvirt.c (virStorageVolResize): correct comment typo according to virStorageVolResizeFlags enum definition. Signed-off-by: NAlex Jia <ajia@redhat.com>
-
由 Daniel P. Berrange 提交于
If no <interface> elements are included in an LXC guest XML description, then the LXC guest will just see the host's network interfaces. It is desirable to be able to hide the host interfaces, without having to define any guest interfaces. This patch introduces a new feature flag <privnet/> to allow forcing of a private network namespace for LXC. In the future I also anticipate that we will add <privuser/> to force a private user ID namespace. * src/conf/domain_conf.c, src/conf/domain_conf.h: Add support for <privnet/> feature. Auto-set <privnet> if any <interface> devices are defined * src/lxc/lxc_container.c: Honour request for private network namespace
-
由 Peter Krempa 提交于
Commit e457d5ef adds ability to pass the default URI using the client configuration file. If the file is not present, it still accesses the NULL config object causing a segfault. Caught running "make check".
-
由 Michal Privoznik 提交于
This function potentially allocates new virCgroup but never frees it.
-