- 20 3月, 2018 6 次提交
-
-
由 Radostin Stoyanov 提交于
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
PEP8 recommends removing whitespace immediately before a comma, semicolon, or colon [1]. In addition remove multiple spaces after keyword (PEP8 - E271). 1: https://www.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statementsReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
PEP8 recommends imports to be on separate lines. [1] 1: https://www.python.org/dev/peps/pep-0008/#importsReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Radostin Stoyanov 提交于
The isinstance() function [1] returns true if an object argument is an instance of a classinfo argument or of a direct, indirect subclass thereof. 1: https://docs.python.org/3/library/functions.html#isinstanceReviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
-
由 Jiri Denemark 提交于
<memballoon model='none'/> is the only way to disable balloon driver since libvirt will add one automatically if the memballoon element is missing. In other words, there's no balloon device if model is 'none' and generating an alias for it makes no sense. The alias will be ignored when parsing the XML and it will disappear once libvirtd is restarted. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Daniel P. Berrangé 提交于
Some contributors are behind obnoxious firewalls that block everything except http(s) traffic, preventing checkout of modules using the git:// protocol. Since git.savannah.gnu.org is using the modern, fast HTTP transport, there's no real downside to using that by default. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 3月, 2018 7 次提交
-
-
由 Christian Ehrhardt 提交于
In a recent change b932ed69: "virt-aa-helper: resolve yet to be created paths" several cases with symlinks in paths were fixed, but it regressed cases where the file being last element of the path was the actual link. In the case of the last element being the symlink realpath can (and shall) be called on the full path that was passed. Examples would be zfs/lvm block devices like: <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/mapper/testlvm-testvol1'/> <target dev='vdd' bus='virtio'/> </disk> With the target being: /dev/mapper/testlvm-testvol1 -> ../dm-0 That currently is rendered as "/dev/mapper/testlvm-testvol1" rwk, but instead should be (and is with the fix): "/dev/dm-0" rwk, Fixes: b932ed69: "virt-aa-helper: resolve yet to be created paths" Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1756394Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Christian Ehrhardt 提交于
libvirt-guests.sh when run with more active guests than requested to shut down in parallel will run until it times out only shutting down the first set of guests. This patch fixes parallel shutdown by fixing a variable scope issue where check_guests_shutdown unintentionally reset $guests which prevented further progress. Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1688508Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Andrea Bolognani 提交于
Some of our scripts are known to work both with Python 2 and Python 3, so for them we shouldn't be forcing any specific version of the interpreter when they're called directly; we always use $(PYTHON) explicitly in our build rules anyway. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Erik Skultety 提交于
Commit b4c2ac8d made a false assumption that IOMMU support necessary for an mdev device to be assigned to a VM. Unlike direct PCI assignment, IOMMU support is not needed for mediated devices, as the physical parent device provides the isolation, therefore, simply checking for VFIO presence is enough to successfully start a VM. Luckily, this issue is not serious, since as of yet, libvirt mandates mdevs to be pre-created prior to a domain's launch - if it is, everything does work smoothly even with IOMMU disabled, because the parent device will ensure the iommu groups we try to access exist. However, if there are *no* IOMMU groups yet, thus no mdev exists yet, one would see the following error: "unsupported configuration: Mediated host device assignment requires VFIO support" The error msg above is simply wrong and doesn't even reflect the IOMMU reality, so after applying this patch one would rather see the following error in such case instead: "device not found: mediated device '<UUID>' not found" Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
What one currently gets is: failed to read '/sys/bus/mdev/devices/<UUID>/mdev_type/device_api': No such file or directory This indicates that something is missing within the device's sysfs tree which likely might be not be the case here because the device simply doesn't exist yet. So, when creating our internal mdev obj, let's check whether the device exists first prior to trying to verify the user-provided model within domain XML. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
==16451== 32,768 bytes in 2 blocks are definitely lost in loss record 1,007 of 1,013 ==16451== at 0x4C2AF0F: malloc (vg_replace_malloc.c:299) ==16451== by 0x7CADB40: nl_recv (in /usr/lib64/libnl-3.so.200.23.0) ==16451== by 0x532DFAC: virNetlinkDumpCommand (virnetlink.c:363) ==16451== by 0x53236AE: virNetDevIPCheckIPv6Forwarding (virnetdevip.c:641) ==16451== by 0xE3E4A1A: networkStartNetworkVirtual (bridge_driver.c:2490) ==16451== by 0xE3E55F5: networkStartNetwork (bridge_driver.c:2832) ==16451== by 0xE3DFFE5: networkAutostartConfig (bridge_driver.c:531) ==16451== by 0x53F47E0: virNetworkObjListForEachHelper (virnetworkobj.c:1412) ==16451== by 0x52FE69F: virHashForEach (virhash.c:606) ==16451== by 0x53F4857: virNetworkObjListForEach (virnetworkobj.c:1439) ==16451== by 0xE3E0BF4: networkStateAutoStart (bridge_driver.c:808) ==16451== by 0x55689CE: virStateInitialize (libvirt.c:758) Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Andrea Bolognani 提交于
The script already works perfectly fine with Python 2, but that's more by chance than by design: we have a single occurrence of print(), and it just so happens that its only argument is an expression. Importing print_function makes the script more future, err, past proof. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 18 3月, 2018 1 次提交
-
-
由 Chen Hanxiao 提交于
fix a mem leak Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 3月, 2018 12 次提交
-
-
由 Chen Hanxiao 提交于
fix some leaks and format issue Also support virArpTableFree to get NULL. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
-
由 Jim Fehlig 提交于
libxlDomainMigrationPrepare adds the incoming domain def to the list of domains via virDomainObjListAdd, but never adds its own ref to the returned virDomainObj as other callers of virDomainObjListAdd do. libxlDomainMigrationPrepareTunnel3 suffers the same discrepancy. Change both to add a ref to the virDomainObj after a successful virDomainObjListAdd, similar to other callers. This ensures a consistent pattern throughout the drivers and allows using the virDomainObjEndAPI function for cleanup. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
For libxlDomainLookupByID and libxlDomainLookupByUUID let's return a locked and referenced @vm object so that callers can then use the common and more consistent virDomainObjEndAPI in order to handle cleanup rather than needing to know that the returned object is locked and calling virObjectUnlock. The LookupByName already returns the ref counted and locked object, so this will make things more consistent. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
由 John Ferlan 提交于
Commit id '9ac94507' altered libxlDomObjFromDomain to return a locked *and* ref counted object for some specific purposes; however, it neglected to alter all the consumers of the helper to use virDomainObjEndAPI thus leaving many objects with extra ref counts. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NJim Fehlig <jfehlig@suse.com>
-
由 Cole Robinson 提交于
Another usage of deprecated 'string' functions. We are just trying to match ascii letters here, so use a simple regex. And again drop the aggressive exception handling, it doesn't seem to trigger for anything in libvirt code. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Module 'string' function lower doesn't exist in python3. The canonical way is to call .lower() on a str instance. Do that, and make the exception handling more specific, which would have made this issue obvious. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Jim Fehlig 提交于
libxlDomObjFromDomain to returns locked and ref counted virDomainObj but libxlDomainMigratePerform3Params only unlocks the object on exit. Convert it to use the virDomainObjEndAPI function for cleanup. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jim Fehlig 提交于
The libxlDomainMigrateConfirm3Params API locks and ref counts the associated virDomainObj but relies on the helper function libxlDomainMigrationConfirm to unlock the object. Unref'ing the object is not done in either function. libxlDomainMigrationConfirm is also used by libxlDomainMigratePerform3Params for p2p migration, but in that case the lock/ref and unref/unlock are properly handled in the API entry point. Remove the unlock from libxlDomainMigrationConfirm and adjust libxlDomainMigrateConfirm3Params to properly unref/unlock the virDomainObj on success and error paths. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jim Fehlig 提交于
The libxlDomainMigrateBegin3Params API locks and ref counts the associated virDomainObj but relies on the helper function libxlDomainMigrationBegin to unref/unlock the object. libxlDomainMigrationBegin is also used by libxlDomainMigratePerform3Params for p2p migration, but in that case the lock/ref and unref/unlock are properly handled in the API entry point. So p2p migrations suffer a double unref/unlock in the Perform API. Remove the unref/unlock (virDomainObjEndAPI) from libxlDomainMigrationBegin and adjust libxlDomainMigrateBegin3Params to properly unref/unlock the virDomainObj on success and error paths. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel P. Berrangé 提交于
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
We forgot to tell anyone that we were publishing security notices online at https://security.libvirt.orgReviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Fedora requires packages to depend on "python2" RPM, not the unversioned "python" name. Fortunately even though RHEL-6 ships a "python" RPM, it has a virtual Provides for the "python2" name, so we don't need to conditionalize this. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 16 3月, 2018 14 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1552127 When building command line for USB controllers we have to do more than just put controller's alias onto the command line. QEMU has concept of these joined USB controllers. For instance ehci and uhci controllers need to create the same USB bus. To achieve that the slave controller needs to refer the master controller. This worked until we've introduced user aliases because both master and slave had the same alias. With user aliases slave can have different alias than master. Therefore, when generating command line for slave we need to look up the master's alias. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Farhan Ali 提交于
commit 7210cef4 'qemu: build command line for virtio input devices' introduced an error, by checking if input bus type is VIR_DOMAIN_DISK_BUS_VIRTIO. Fix it by using the correct bus type for input devices. Signed-off-by: NFarhan Ali <alifm@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Farhan Ali 提交于
Commit id '177db487' renamed 'qemuValidateDevicePCISlotsChipsets' to 'qemuDomainValidateDevicePCISlotsChipsets', but didn't adjust comment. Signed-off-by: NFarhan Ali <alifm@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This function is exported and therefore we have to have implementation for all platforms. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
We have to use VIR_WARNINGS_NO_CAST_ALIGN to avoid clang warning about increased required alignment caused by some netlink macros. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc Hartmayer 提交于
Set the eventID for remoteRelayDomainQemuMonitorEvent explicitly to an invalid value. Although the value is not used by remoteRelayDomainQemuMonitorEvent, but it might be less prone to errors for further refactorings. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Use stream->prog instead of a hard-coded "remoteProgram" since at stream creation in daemonCreateClientStream "remoteProgram" is used so we should use that especially since these functions are intended as generic helpers for streams. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Remove unneeded global variables and convert them into local variables where they're needed. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
In case of an error do the cleanup of the private data of the connection. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Refactor testConnectClose as it's then obvious that conn->privateData is set to NULL in all cases. In addition, 'testConnectCloseInternal' can be better reused. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Rename the variable @defaultConn to @defaultPrivconn as it doesn't point to a default connection but to the private data used for the shared default connection of the test driver. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Set privateData to NULL also for a connection that uses @defaultConn as privateData regardless of whether @defaultConn was freed or not. @defaultConn is shared between multiple connections and it's ensured that there will be no memory leak by counting references. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Marc Hartmayer 提交于
Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-