- 31 1月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
The virBitmapNew() function reports only OOM errors. Split out the internals into a "quiet" function and add a wrapper that reports the error.
-
由 Peter Krempa 提交于
To allow constructing of value objects stepwise explode the helper into separate steps and allow appending into existing value objects.
-
- 30 1月, 2015 2 次提交
-
-
由 Tony Krowiak 提交于
This patch provides the utility functions needed to synchronize the rxfilter changes made to a guest domain with the corresponding macvtap devices on the host: * Get/set PROMISC flag * Get/set ALLMULTI, MULTICAST Signed-off-by: NTony Krowiak <akrowiak@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 John Ferlan 提交于
A gnulib change (commit id 'beae0bdc') causes ENOTCONN to be returned from recvfd which causes us to fall into the throwaway waitpid() call and return ENOTCONN to the caller, this then gets displayed during a 'virsh save' when using a root squashed NFS environment that's trying to save the file as something other than root:root. This patch will add the additional check for ENOTCONN to force the code into the waitpid loop looking for the actual status from the _exit()'d child fork. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 29 1月, 2015 3 次提交
-
-
由 Ján Tomko 提交于
When compiling without WITH_MACVTAP, we can get: 'unsupported flags (0x1) in function virNetDevMacVLanCreateWithVPortProfile' on an attempt to start a domain. Remove the flag check to reach the more helpful error: Cannot create macvlan devices on this platform https://bugzilla.redhat.com/show_bug.cgi?id=1186928
-
由 Peter Krempa 提交于
After virBitmapEqual is able to compare NULL bitmaps few bits of code can be cleaned up.
- 27 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
In many cases where we invoke virSystemdTerminateMachine the process(es) will have already gone away on their own accord. In these cases we log an error message that the machine does not exist. We should catch this particular error and simply ignore it, so we don't pollute the logs.
-
- 26 1月, 2015 4 次提交
-
-
由 Ján Tomko 提交于
After the 8-byte size header, there are two one-byte headers and two bytes of padding before the crypt_header field. Our QCOW1_HDR_CRYPT constant did not skip the padding. http://git.qemu.org/?p=qemu.git;a=blob;f=block/qcow.c;h=ece22697#l41 https://bugzilla.redhat.com/show_bug.cgi?id=1185165
-
由 Daniel P. Berrange 提交于
Add a virDBusErrorIsUnknownMethod helper so that callers don't need todo string comparisons themselves to detect standard error names.
-
由 Daniel P. Berrange 提交于
The virDBusMethodCall method has a DBusError as one of its parameters. If the caller wants to pass a non-NULL value for this, it immediately makes the calling code require DBus at build time. This has led to breakage of non-DBus builds several times. It is desirable that only the virdbus.c file should need WITH_DBUS conditionals, so we must ideally remove the DBusError parameter from the method. We can't simply raise a libvirt error, since the whole point of this parameter is to give the callers a way to check if the error is one they want to ignore, without having the logs polluted with an error message. So, we add a virErrorPtr parameter which the caller can then either ignore or raise using the new virReportErrorObject method. This new method is distinct from virSetError in that it ensures the logging hooks are run. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
- 23 1月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
The function doesn't allow to modify the array in any way, thus the argument can be const.
-
由 Ján Tomko 提交于
Per-cpu stats are only shown for present CPUs in the cgroups, but we were only parsing the largest CPU number from /sys/devices/system/cpu/present and looking for stats even for non-present CPUs. This resulted in: internal error: cpuacct parse error
-
- 20 1月, 2015 1 次提交
-
- 17 1月, 2015 1 次提交
-
-
由 Cédric Bosdonnat 提交于
-
- 16 1月, 2015 1 次提交
-
-
由 Cédric Bosdonnat 提交于
If 0.0.0.0 or :: address is provided, then the returned prefix should be 0, for the default address.
-
- 15 1月, 2015 7 次提交
-
-
由 Daniel P. Berrange 提交于
Add a helper method that can validate an XML document against an RNG schema
-
由 Daniel P. Berrange 提交于
A number of methods take an int for a parameter that indicates the size of an array. The correct type for array sizes is size_t
-
由 Daniel P. Berrange 提交于
Every dtrace/systemd probe also include a libvirt log message. These are logged at level DEBUG currently, which means if you want to see all probes they are drowned by the rest of the DEBUG messages. Since we don't really use the INFO log level for much, it seems reasonable to suggest we log all probes at level INFO.
-
由 Daniel P. Berrange 提交于
When debugging libvirt it is helpful to set probes around RPC calls. We already have probes for libvirt's native RPC layer, so it makes sense to add them for the DBus RPC layer too.
-
由 Daniel P. Berrange 提交于
systemd-machined introduced a new method CreateMachineWithNetwork that obsoletes CreateMachine. It expects to be given a list of VETH/TAP device indexes for the host side device(s) associated with a container/machine. This falls back to the old CreateMachine method when the new one is not supported.
-
由 Shivaprasad G Bhat 提交于
The virsh start <domain> fails with qemu error when the hostdevices of the same iommu group are used actively by other vms. It is not clear which hostdev from the same iommu group is used by any of the running guests. User has to go through every guest xml to figure out who is using the hostdev of same iommu group. Solution: Iterate the iommu group of the hostdev and error our neatly in case a device in the same iommu group is busy. Reattach code also does the same kind of check, remove duplicate code as well. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Shivaprasad G Bhat 提交于
Basically a getter function which is implemented for accessing the address fields in virPCIDevice. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 1月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Found this one by inspection... The API claims to "own" the input value even in the case of error. However, in the initial entry to the API if the value exists, was STRING, but without a str value it just returned without freeing the 'value' which it claims to now own. So I added the virConfFreeValue() call in order to resolve. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 09 1月, 2015 1 次提交
-
-
由 Ján Tomko 提交于
Remove the resize flag and use the same code path for all callers. This flag was added by commit 18f03166 to allow virStorageFileResize use 'safezero' while preserving the behavior. Explicitly return -2 when a fallback to a different method should be done, to make the code path more obvious. Fail immediately when ftruncate fails in the mmap method, as we did before commit 18f03166.
-
- 06 1月, 2015 8 次提交
-
-
由 Eric Blake 提交于
Commit 4dc04d3a added virNetlinkGetErrorCode, but forgot to provide a fallback, which kills the build on mingw (among others): CCLD libvirt.la Cannot export virNetlinkGetErrorCode: symbol not defined collect2: error: ld returned 1 exit status * src/util/virnetlink.c (virNetlinkGetErrorCode): Provide fallback. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Cédric Bosdonnat 提交于
Network interfaces devices and host devices with net capabilities can now have IPv4 and/or an IPv6 routes configured.
-
由 Cédric Bosdonnat 提交于
Uses the new virDomainNetDef ips to set the IP addresses on the network interfaces in the container.
-
由 Cédric Bosdonnat 提交于
Make clear that virNetDevClearIPv4Address can also handle IPv6 addresses by changing the name
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
-
由 Cédric Bosdonnat 提交于
Renamed virNetDevSetIPv4Address as it also handles IPv6 addresses.
-
由 Cédric Bosdonnat 提交于
Add a default implementation of virNetDevSetIPv4Address using netlink and libnl. This avoids requiring /usr/sbin/ip or /usr/sbin/ifconfig external binaries.
-
- 23 12月, 2014 1 次提交
-
-
由 Stefan Berger 提交于
Some of the nwfilter tests are now failing since --concurrent shows up in the ebtables command. To avoid this, implement a function preventing the probing for lock support in the eb/iptables tools and use it in the tests. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 21 12月, 2014 2 次提交
-
-
由 Martin Kletzander 提交于
There is one problem that causes various errors in the daemon. When domain is waiting for a job, it is unlocked while waiting on the condition. However, if that domain is for example transient and being removed in another API (e.g. cancelling incoming migration), it get's unref'd. If the first call, that was waiting, fails to get the job, it unref's the domain object, and because it was the last reference, it causes clearing of the whole domain object. However, when finishing the call, the domain must be unlocked, but there is no way for the API to know whether it was cleaned or not (unless there is some ugly temporary variable, but let's scratch that). The root cause is that our APIs don't ref the objects they are using and all use the implicit reference that the object has when it is in the domain list. That reference can be removed when the API is waiting for a job. And because each domain doesn't do its ref'ing, it results in the ugly checking of the return value of virObjectUnref() that we have everywhere. This patch changes qemuDomObjFromDomain() to ref the domain (using virDomainObjListFindByUUIDRef()) and adds qemuDomObjEndAPI() which should be the only function in which the return value of virObjectUnref() is checked. This makes all reference counting deterministic and makes the code a bit clearer. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Commit 1a80b97d, which added the virCgroupHasEmptyTasks() function forgot that the parameter @cgroup may be NULL and did not check that. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 12月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
The code assumes that def->vcpus == nvcpupids, so when we setup fake CPU pids for old QEMU with nvcpupids == 1, we cause the later code to read off the end of the array. This has fun results like sche_setaffinity(0, ...) which changes libvirtd's own CPU affinity, or even better sched_setaffinity($RANDOM, ...) which changes the affinity of a random OS process.
-
- 18 12月, 2014 1 次提交
-
-
由 Boris Fiuczynski 提交于
On a system with 160 CPUs the /proc/cpuinfo size grows beyond the currently set limit of 10KB causing an internal error. This patch increases the buffer size to 1MB. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
-
- 17 12月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Right now, grabbing blockinfo always calls stat on the disk, then opens the image to determine the capacity, using a throw-away virStorageSourcePtr. This has a couple of drawbacks: 1. We are calling stat and opening a file on every invocation of the API. However, there are cases where the stats should NOT be changing between successive calls (if a domain is running, no one should be changing the physical size of a block device or raw image behind our backs; capacity of read-only files should not be changing; and we are the gateway to the block-resize command to know when the capacity of read-write files should be changing). True, we still have to use stat in some cases (a sparse raw file changes allocation if it is read-write and the amount of holes is changing, and a read-write qcow2 image stored in a file changes physical size if it was not fully pre-allocated). But for read-only images, even this should be something we can remember from the previous time, rather than repeating every call. 2. We want to enhance the power of virDomainListGetStats, by sharing code. But we already have a virStorageSourcePtr for each disk, and it would be easier to reuse the common structure than to have to worry about the one-off virDomainBlockInfoPtr. While this patch does not optimize reuse of information in point 1, it does get us closer to being able to do so; by updating a structure that survives between consecutive calls. * src/util/virstoragefile.h (_virStorageSource): Add physical, to mirror virDomainBlockInfo; rearrange fields to match public struct. (virStorageSourceCopy): Copy the new field. * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Store into storage source, then copy to block info. Signed-off-by: NEric Blake <eblake@redhat.com>
-