- 19 4月, 2012 1 次提交
-
-
由 Eric Blake 提交于
The sequence: long long val; if ((long long) val != val) is dead code. * src/util/util.c (virStrToLong_ll, virStrToLong_ull): Remove useless cast.
-
- 18 4月, 2012 1 次提交
-
-
由 D. Herrendoerfer 提交于
Currently upon a migration a callback is created when a 802.1qbg link is set to PREASSOCIATE, this should not happen because this is a no-op on most switches, and does not lead to an ASSOCIATE state. This patch only creates callbacks when CREATE or RESTORE is requested. Migration and libvirtd restart scenarios are already handled elsewhere. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-
- 14 4月, 2012 1 次提交
-
-
由 Philipp Hahn 提交于
The linux-2.6.32 kernel header does not yet define IFLA_VF_MAX and others, which breaks compiling a new libvirt on old systems like Debian Squeeze. (I also have to add --without-macvtap --disable-werror --without-virtualport to ./configure to get it to compile.) Signed-off-by: NPhilipp Hahn <hahn@univention.de>
-
- 13 4月, 2012 1 次提交
-
-
由 D. Herrendoerfer 提交于
This patch adds a netlink callback when migrating a VEPA enabled virtual machine. It fixes a Bug where a VM would not request a port association when it was cleared by lldpad. This patch requires the latest git version of lldpad to work. Signed-off-by: ND. Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
-
- 06 4月, 2012 2 次提交
-
-
由 Eric Blake 提交于
Leak introduced in commit 0436d328. If we allocate an actions array, but fail early enough to never consume it with the qemu monitor transaction call, we leaked memory. But our semantics of making the transaction command free the caller's memory is awkward; avoiding the memory leak requires making every intermediate function in the call chain check for error. It is much easier to fix things so that the function that allocates also frees, while the call chain leaves the caller's data intact. To do that, I had to hack our JSON data structure to make it easy to protect a portion of an arbitrary JSON tree from being freed. * src/util/json.h (virJSONType): Name the enum. (_virJSONValue): New field. * src/util/json.c (virJSONValueFree): Use it to protect a portion of an array. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONTransaction): Avoid freeing caller's data. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateDiskActive): Free actions array on failure.
-
由 Guido Günther 提交于
This got dropped with 300e60e1 Cheers, -- Guido
-
- 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.
-
- 30 3月, 2012 4 次提交
-
-
由 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 提交于
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 提交于
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>
-
由 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 ().
-
- 27 3月, 2012 2 次提交
-
-
由 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>
-
由 Martin Kletzander 提交于
Return statements with parameter enclosed in parentheses were modified and parentheses were removed. The whole change was scripted, here is how: List of files was obtained using this command: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' Found files were modified with this command: sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_' Then checked for nonsense. The whole command looks like this: git grep -l -e '\<return\s*([^()]*\(([^()]*)[^()]*\)*)\s*;' | \ grep -e '\.[ch]$' -e '\.py$' | xargs sed -i -e \ 's_^\(.*\<return\)\s*(\(\([^()]*([^()]*)[^()]*\)*\))\s*\(;.*$\)_\1 \2\4_' \ -e 's_^\(.*\<return\)\s*(\([^()]*\))\s*\(;.*$\)_\1 \2\3_'
-
- 26 3月, 2012 1 次提交
-
-
由 Eric Blake 提交于
When qparams support was dropped in commit bc1ff160, we forgot to add tests to ensure that viruri can do the same round trip handling of a URI. This round trip was broken, due to use of the old 'query' field of xmlUriPtr, instead of the new 'query_raw' Also, we forgot to report an OOM error. * tests/viruritest.c (mymain): Add tests based on just-deleted qparamtest. (testURIParse): Allow difference in input and expected output. * src/util/viruri.c (virURIFormat): Add missing error. Use query_raw, instead of query for xmlUriPtr object.
-
- 23 3月, 2012 12 次提交
-
-
由 Prerna Saxena 提交于
Libvirt on x86 parses 'dmidecode' to gather characteristics of host system. On PowerPC, this is now implemented by reading /proc/cpuinfo NOTE: memory-DIMM information is not presently implemented. Acked-by: NDaniel Veillard <veillard@redhat.com> Acked-by: NDaniel P Berrange <berrange@redhat.com> Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
-
由 Daniel P. Berrange 提交于
When SASL requests auth credentials, try to look them up in the config file first. If any are found, remove them from the list that the user is prompted for Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 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>
-
- 20 3月, 2012 2 次提交
-
-
由 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 提交于
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.)
-
- 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.
-
- 12 3月, 2012 3 次提交
-
-
由 Eric Blake 提交于
Thanks to cgroups, providing user vs. system time of the overall guest is easy to add to our existing API. * include/libvirt/libvirt.h.in (VIR_DOMAIN_CPU_STATS_USERTIME) (VIR_DOMAIN_CPU_STATS_SYSTEMTIME): New constants. * src/util/virtypedparam.h (virTypedParameterArrayValidate) (virTypedParameterAssign): Enforce checking the result. * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Fix offender. (qemuDomainGetTotalcpuStats): Implement new parameters. * tools/virsh.c (cmdCPUStats): Tweak output accordingly.
-
由 Eric Blake 提交于
As documented in linux.git/Documentation/cgroups/cpuacct.txt, cpuacct.stat returns user and system time in ticks (the same unit used in times(2)). It would be a bit nicer if it were like getrusage(2) and reported timeval contents, or like cpuacct.usage and in nanoseconds, but we can't be picky. * src/util/cgroup.h (virCgroupGetCpuacctStat): New function. * src/util/cgroup.c (virCgroupGetCpuacctStat): Implement it. (virCgroupGetValueStr): Allow for multi-line files. * src/libvirt_private.syms (cgroup.h): Export it.
-
由 Eric Blake 提交于
If there is a disk file with a comma in the name, QEmu expects a double comma instead of a single one (e.g., the file "virtual,disk.img" needs to be specified as "virtual,,disk.img" in QEmu's command line). This patch fixes libvirt to work with that feature. Fix RHBZ #801036. Based on an initial patch by Crístian Viana. * src/util/buf.h (virBufferEscape): Alter signature. * src/util/buf.c (virBufferEscape): Add parameter. (virBufferEscapeSexpr): Fix caller. * src/qemu/qemu_command.c (qemuBuildRBDString): Likewise. Also escape commas in file names. (qemuBuildDriveStr): Escape commas in file names. * docs/schemas/basictypes.rng (absFilePath): Relax RNG to allow commas in input file names. * tests/qemuxml2argvdata/*-disk-drive-network-sheepdog.*: Update test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 09 3月, 2012 7 次提交
-
-
由 Laine Stump 提交于
This is nearly identical to an earlier patch for virnetlink.c. There are special stub versions of all public functions in this file that are compiled when the platform isn't linux. Each of these functions had an almost identical message, differing only in the function name included in the message. Since log messages already contain the function name, we can just define a const char* with the common part of the string, and use that same string for all the log messages. If nothing else, this at least makes for less strings that need translating...
-
由 Laine Stump 提交于
There are several functions that call virNetlinkCommand, and they all follow a common pattern, with three exit labels: err_exit (or cleanup), malformed_resp, and buffer_too_small. All three of these labels do their own cleanup and have their own return. However, the malformed_resp label usually frees the same items as the cleanup/err_exit label, and the buffer_too_small label just doesn't free recvbuf (because it's known to always be NULL at the time we goto buffer_too_small. In order to simplify and standardize the code, I've made the following changes to all of these functions: 1) err_exit is replaced with the more libvirt-ish "cleanup", which makes sense because in all cases this code is also executed in the case of success, so labelling it err_exit may be confusing. 2) rc is initialized to -1, and set to 0 just before the cleanup label. Any code that currently sets rc = -1 is made to instead goto cleanup. 3) malformed_resp and buffer_too_small just log their error and goto cleanup. This gives us a single return path, and a single place to free up resources. 4) In one instance, rather then logging an error immediately, a char* msg was pointed to an error string, then goto cleanup (and cleanup would log an error if msg != NULL). It takes no more lines of code to just log the message as we encounter it. This patch should have 0 functional effects.
-
由 Laine Stump 提交于
There are special stub versions of all public functions in this file that are compiled when either libnl isn't available or the platform isn't linux. Each of these functions had two almost identical message, differing only in the function name included in the message. Since log messages already contain the function name, we can just define a const char* with the common part of the string, and use that same string for all the log messages. Also, rather than doing #if defined ... #else ... #endif *inside the error log macro invocation*, this patch does #if defined ... just once, using it to decide which single string to define. This turns the error log in each function from 6 lines, to 1 line.
-
由 Laine Stump 提交于
OOM conditions silently returned failure.
-
由 Ansis Atteka 提交于
This patch will allow OpenFlow controllers to identify which interface belongs to a particular VM by using the Domain UUID. ovs-vsctl get Interface vnet0 external_ids {attached-mac="52:54:00:8C:55:2C", iface-id="83ce45d6-3639-096e-ab3c-21f66a05f7fa", iface-status=active, vm-id="142a90a7-0acc-ab92-511c-586f12da8851"} V2 changes: Replaced vm-uuid with vm-id. There was a discussion in Open vSwitch mailinglist that we should stick with the same DB key postfixes for the sake of consistency (e.g iface-id, vm-id ...).
-
由 Laine Stump 提交于
The indentation on the final lines of the function was off by four spaces, making me wonder for a second if there was something missing. (There wasn't.)
-
由 Laine Stump 提交于
Absence of this stub function caused a build failure on mingw32.
-