- 02 5月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
A couple of places in the QEMU XML -> ARGV conversion code raised an error but then forgot to return an error status due to missing gotos. While fixing this also tweak style of a couple of other error reports Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 01 5月, 2014 4 次提交
-
-
由 Laine Stump 提交于
If a domain network interface that contains a <filterref> is modified "live" using "virsh update-device --live", libvirtd would crash. This was because the code supporting live update of an interface's filterref was assuming that a filterref might be added or modified, but didn't account for removing the filterref, resulting in a null dereference of the filter name. Introduced with commit 258fb278, which was first in libvirt v1.0.1. This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1093301
-
由 Peter Krempa 提交于
To avoid memory leak of the "backingStoreRaw" field when reparsing backing chains a new function is being introduced by this patch that shall be used to clear backing store information. The memory leak was introduced in commit 8823272d.
-
由 Stefan Berger 提交于
Refactor the ebiptablesTearNewRules function so that the teardown of temporary filters can also be called by the ebiptablesAllTeardown function. This fixes a problem that leaves temporary filters behind when a VM shuts down while its filters are modified. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> v1->v2: - test cases adjusted to expect more commands
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=808463 Well, libvirt doesn't distinguish between domain poweroff and hibernation (S4). It's hard to differentiate these two on a real machine anyway. As a result, any device that is hot(un-)plugged is lost (appears again) when domain is started again as from our POV it is a fresh cold boot. Instead of doing anything wise here, we should just document this as known limitation. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 30 4月, 2014 6 次提交
-
-
由 Daniel P. Berrange 提交于
The LXC controller itself needs to mknod the USB device node in /dev/bus/usb, so we can't block mknod permission from the cgroup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Stefan Berger 提交于
An IP or IPv6 rule with port specification but without protocol specification cannot be instantiated by ebtables. The documentation points to 'protocol' being required but implementation does not enforce it to be given. Implement a rule validation function that checks whether the rule is valid when it is defined. This for example prevents the definition of rules like: <ip dstportstart='53'> where a protocol attribute would be required for it to be valid and for ebtables to be able to instantiate it. A valid rule then is: <ip protocol='udp' dstportstart='53'> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Sahid Orentino Ferdjaoui 提交于
This commit adds a new example to illustrate peer to peer domain migration with virDomainMigrateToURI. Signed-off-by: NSahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
-
由 Sahid Orentino Ferdjaoui 提交于
This commit provides the ability to virDomainMigrateToURI to check for SASL credentials when attempts to migrate a domain with the driver QEMU. Signed-off-by: NSahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
-
由 Pavel Hrdina 提交于
We need to include the testutils.h also for freebsd. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Freebsd doesn't know ENODATA so we have to use different EINVAL error code. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 29 4月, 2014 17 次提交
-
-
由 Eric Blake 提交于
Commit 5c43e2e0 introduced a NULL deref if there is a failure in virStorageFileGetMetadataInternal. * src/util/virstoragefile.c (virStorageFileGetMetadataFromBuf): Fix error handling. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Daniel P. Berrange 提交于
We don't support building libvirtd on Win32 since we lack the fork/exec feature needed for the stateful drivers. Disable this by default, so users can just do 'mingw32-configure' with no special args required. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
SO_REUSEADDR on Windows is actually akin to SO_REUSEPORT on Linux/BSD. ie it allows 2 apps to listen to the same port at once. Thus we must not set it on Win32 platforms See http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621.aspxSigned-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Martin Kletzander 提交于
When EIO comes to qemu while it's replying to qemuMigrationUpdateJobStatus(), qemu blocks, the migration of RAM can complete in the meantime, and when qemu unblocks, it sends us BLOCK_IO_ERROR plus migrations "status": "complete". Even though we act upon the BLOCK_IO_ERROR by setting the proper state of the domain, the call still waits for the proper reply on monitor for query_migrate and after it gets it, it checks that migration is completed and the migration is finished. This is what abort_on_error flag was meant for (we can migrate with these errors, but this flag must inhibit such behaviour). Changing the order of the steps guarantees the flag works properly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1045833Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Based on suggestion from Eric [1], because it might not get cleaned up before the release, so to avoid potential errors. [1] https://www.redhat.com/archives/libvir-list/2014-April/msg00929.htmlSigned-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Chen Hanxiao 提交于
commit ddf2dfa1 provided a way to determine which bios files to use. But we need to update related docs. disccussed at: http://www.redhat.com/archives/libvir-list/2012-June/msg01286.htmlSigned-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Steven McDonald 提交于
The stripe_unit and stripe_count arguments are passed to rbd_create3 in the wrong order, resulting in a stripe size of 1 byte with 4194304 stripes on newly created RBD volumes. https://bugzilla.redhat.com/show_bug.cgi?id=1092208Signed-off-by: NSteven McDonald <steven.mcdonald@anchor.net.au>
-
由 Eric Blake 提交于
Now that all clients have been adjusted, ensure that no future misuse of readdir is introduced into the code base. * cfg.mk (sc_prohibit_readdir): New rule. * src/util/virfile.c (virDirRead): Exempt the wrapper. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Laine Stump 提交于
This attempts to follow the same variable name and usage patterns as the other conversions to virDirRead().
-
由 Eric Blake 提交于
More instances of failure to report (unlikely) readdir errors. In one case, I chose to ignore them, given that a readdir error would be no different than timing out on the loop, where the fallback path behaves correctly either way. * src/storage/storage_backend.c (virStorageBackendStablePath): Ignore readdir errors. * src/storage/storage_backend_fs.c (virStorageBackendFileSystemRefresh): Report readdir errors. * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIGetHostNumber): Likewise. * src/storage/storage_backend_scsi.c (getNewStyleBlockDevice) (getBlockDevice, virStorageBackendSCSIFindLUs): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Convert all remaining clients of readdir to use the new interface, so that we can ensure (unlikely) errors while reading a directory are reported. * src/openvz/openvz_conf.c (openvzAssignUUIDs): Use new interface. * src/parallels/parallels_storage.c (parallelsFindVolumes) (parallelsFindVmVolumes): Report readdir failures. * src/qemu/qemu_driver.c (qemuDomainSnapshotLoad): Ignore readdir failures. * src/secret/secret_driver.c (loadSecrets): Likewise. * src/qemu/qemu_hostdev.c (qemuHostdevHostSupportsPassthroughVFIO): Report readdir failures. * src/xen/xen_inotify.c (xenInotifyOpen): Likewise. * src/xen/xm_internal.c (xenXMConfigCacheRefresh): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
In making the conversion to the new API, I fixed a couple bugs: virSCSIDeviceGetSgName would leak memory if a directory unexpectedly contained multiple entries; virNetDevTapGetRealDeviceName could report a spurious error from a stale errno inherited before starting the readdir search. The decision on whether to store the result of virDirRead into a variable is based on whether the end of the loop falls through to cleanup code automatically. In some cases, we have loops that are documented to return NULL on failure, and which raise an error on most failure paths but not in the case where the directory was unexpectedly empty; it may be worth a followup patch to explicitly report an error if readdir was successful but the directory was empty, so that a NULL return always has an error set. * src/util/vircgroup.c (virCgroupRemoveRecursively): Use new interface. (virCgroupKillRecursiveInternal, virCgroupSetOwner): Report readdir failures. * src/util/virfile.c (virFileLoopDeviceOpenSearch) (virFileNBDDeviceFindUnused, virFileDeleteTree): Use new interface. * src/util/virnetdevtap.c (virNetDevTapGetRealDeviceName): Properly check readdir errors. * src/util/virpci.c (virPCIDeviceIterDevices) (virPCIDeviceFileIterate, virPCIGetNetName): Report readdir failures. (virPCIDeviceAddressIOMMUGroupIterate): Use new interface. * src/util/virscsi.c (virSCSIDeviceGetSgName): Report readdir failures, and avoid memory leak. (virSCSIDeviceGetDevName): Report readdir failures. * src/util/virusb.c (virUSBDeviceSearch): Report readdir failures. * src/util/virutil.c (virGetFCHostNameByWWN) (virFindFCHostCapableVport): Report readdir failures. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
When reading configuration files, we were silently ignoring directory read failures. While unlikely, we might as well report them. * src/conf/domain_conf.c (virDomainObjListLoadAllConfigs): Report readdir errors. * src/conf/network_conf.c (virNetworkLoadAllState) (virNetworkLoadAllConfigs): Likewise. * src/conf/nwfilter_conf.c (virNWFilterLoadAllConfigs): Likewise. * src/conf/storage_conf.c (virStoragePoolLoadAllConfigs): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Natanael Copa 提交于
This makes sure that errno is reset before readdir is called, even if the loop does a 'continue'. This fixes issue with musl libc which sets errno on sscanf. The following 'continue' makes the errno be set before calling readdir. Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Natanael Copa 提交于
Introduce a wrapper for readdir. This helps us make sure that we always set errno before calling readdir and it will make sure errors are properly logged. Signed-off-by: NNatanael Copa <ncopa@alpinelinux.org> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Jim Fehlig 提交于
With xend on the way out, installations may not even have /usr/sbin/xend, which results in the following error when the drivers are probed 2014-04-28 18:21:19.271+0000: 22129: error : virCommandWait:2426 : internal error: Child process (/usr/sbin/xend status) unexpected exit status 127: libvirt: error : cannot execute binary /usr/sbin/xend: No such file or directory Check for existence of /usr/sbin/xend before trying to run it with the 'status' option.
-
- 28 4月, 2014 5 次提交
-
-
由 Daniel P. Berrange 提交于
The virFirewallAddRuleFull method originally had a single compulsory virFirewallQueryCallback parameter. During dev work though the ignoreErrors parameter was added and the callback parameter made optional. The ATTRIBUTE_NONNULL annotation was never removed though. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The virnetsocket.c API is hardcoded to pass --timeout=30 to any daemon it auto-starts. For inexplicable reasons the virtlockd daemon did not implement the --timeout option, so it would immediately exit on autostart with an error. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Make the lock plugin use virFileFindResource to find the virtlockd daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Make the remote driver use virFileFindResource to find the libvirt daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Jiri Denemark 提交于
When a snapshot operation finishes we have to recheck the backing chain of all disks involved in the snapshot. And we need to do that even if the operation failed because some of the disks might have changed if QEMU did not support transactions.
-
- 27 4月, 2014 6 次提交
-
-
由 Laine Stump 提交于
The check for a network being active during interface attach was being done individually in several places (by both the lxc driver and the qemu driver), but those places were too specific, leading to it *not* being checked when allocating a connection/device from a macvtap or hostdev network. This patch puts a single check in networkAllocateActualDevice(), which is always called before the any network interface is attached to any type of domain. It also removes all the other now-redundant checks from the lxc and qemu drivers. NB: the following patches are prerequisites for this patch, in the case that it is backported to any branch: 440beeb7 network: fix virNetworkObjAssignDef and persistence 8aaa5b68 network: create statedir during driver initialization b9e95491 network: change location of network state xml files 411c5486 network: set macvtap/hostdev networks active if their state file exists This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=880483
-
由 Laine Stump 提交于
libvirt attempts to determine at startup time which networks are already active, and set their active flags. Previously it has done this by assuming that all networks are inactive, then setting the active flag if the network has a bridge device associated with it and that bridge device exists. This is not useful for macvtap and hostdev based networks, since they do not use a bridge device. Of course the reason that such a check had to be done was that the presence of a status file in the network "stateDir" couldn't be trusted as an indicator of whether or not a network was active. This was due to the network driver mistakenly using /var/lib/libvirt/network to store the status files, rather than /var/run/libvirt/network (similar to what is done by every other libvirt driver that stores status xml for its objects). The difference is that /var/run is cleared out when the host reboots, so you can be assured that the state file you are seeing isn't just left over from a previous boot of the host. Now that the network driver has been switched to using /var/run/libvirt/network for status, we can also modify it to assume that any network with an existing status file is by definition active - we do this when reading the status file. To fine tune the results, networkFindActiveConfigs() is changed to networkUpdateAllState(), and only sets active = 0 if the conditions for particular network types are *not* met. The result is that during the first run of libvirtd after the host boots, there are no status files, so no networks are active. Any time libvirtd is restarted, any network with a status file will be marked as active (unless the network uses a bridge device and that device for some reason doesn't exist).
-
由 Laine Stump 提交于
For some reason these have been stored in /var/lib, although other drivers (e.g. qemu and lxc) store their state files in /var/run. It's much nicer to store state files in /var/run because it is automatically cleared out when the system reboots. We can then use existence of the state file as a convenient indicator of whether or not a particular network is active. Since changing the location of the state files by itself will cause problems in the case of a *live* upgrade from an older libvirt that uses /var/lib (because current status of active networks will be lost), the network driver initialization has been modified to migrate any network state files from /var/lib to /var/run. This will not help those trying to *downgrade*, but in practice this will only be problematic in two cases 1) If there are networks with network-wide bandwidth limits configured *and in use* by a guest during a downgrade to "old" libvirt. In this case, the class ID's used for that network's tc rules, as well as the currently in-use bandwidth "floor" will be forgotten. 2) If someone does this: 1) upgrade libvirt, 2) downgrade libvirt, 3) modify running state of network (e.g. add a static dhcp host, etc), 4) upgrade. In this case, the modifications to the running network will be lost (but not any persistent changes to the network's config).
-
由 Laine Stump 提交于
This directory should be created when the network driver is first started up, not just when a dhcp daemon is run. This hasn't posed a problem in the past, because the directory has always been pre-existing.
-
由 Laine Stump 提交于
Experimentation showed that if virNetworkCreateXML() was called for a network that was already defined, and then the network was subsequently shutdown, the network would continue to be persistent after the shutdown (expected/desired), but the original config would be lost in favor of the transient config sent in with virNetworkCreateXML() (which would then be the new persistent config) (obviously unexpected/not desired). To fix this, virNetworkObjAssignDef() has been changed to 1) properly save/free network->def and network->newDef for all the various combinations of live/active/persistent, including some combinations that were previously considered to be an error but didn't need to be (e.g. setting a "live" config for a network that isn't yet active but soon will be - that was previously considered an error, even though in practice it can be very useful). 2) automatically set the persistent flag whenever a new non-live config is assigned to the network (and clear it when the non-live config is set to NULL). the libvirt network driver no longer directly manipulates network->persistent, but instead relies entirely on virNetworkObjAssignDef() to do the right thing automatically. After this patch, the following sequence will behave as expected: virNetworkDefineXML(X) virNetworkCreateXML(X') (same name but some config different) virNetworkDestroy(X) At the end of these calls, the network config will remain as it was after the initial virNetworkDefine(), whereas previously it would take on the changes given during virNetworkCreateXML(). Another effect of this tighter coupling between a) setting a !live def and b) setting/clearing the "persistent" flag, is that future patches which change the details of network lifecycle management (e.g. upcoming patches to fix detection of "active" networks when libvirtd is restarted) will find it much more difficult to break persistence functionality.
-
由 Dwight Engen 提交于
This fixes the following make rpm warning: warning: Installed (but unpackaged) file(s) found: /usr/lib64/libvirt/connection-driver/libvirt_driver_nwfilter.so.0 /usr/lib64/libvirt/connection-driver/libvirt_driver_nwfilter.so.0.0.0 introduced in comit 8d559864Signed-off-by: NDwight Engen <dwight.engen@oracle.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 26 4月, 2014 1 次提交
-
-
由 Ian Campbell 提交于
Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the serial devices are duplicated as consoles it is sufficient to just use the console devices unconditionally. Tested with the following bit of config XML: <domain type='xen'> ... <devices> <console type='pty'> <target type='xen'/> </console> </devices> </domain> I have observed and tested this on ARM but I believe it also applies to x86 PV guests. Signed-off-by: NIan Campbell <ian.campbell@citrix.com> Cc: Jim Fehlig <jfehlig@suse.com> Cc: Dario Faggioli <dario.faggioli@citrix.com> Cc: Clark Laughlin <clark.laughlin@linaro.org>
-