- 23 2月, 2018 1 次提交
-
-
由 Jiri Denemark 提交于
vm->def->nets[changeidx] can never be NULL for changeidx returned by virDomainNetFindIdx. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 22 2月, 2018 3 次提交
-
-
由 John Ferlan 提交于
Rather than having the caller check, if the input @addrs is NULL (e.g. priv->usbaddrs), then just return 0. This also removes the need for ATTRIBUTE_NONNULL which only really helped if someone passed a NULL as a parameter not if the passed parameter is NULL. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than having the caller check, if the input @addrs is NULL (e.g. priv->usbaddrs), then just return 0. This also removes the need for ATTRIBUTE_NONNULL which only really helped if someone passed a NULL as a parameter not if the passed parameter is NULL. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements, or cast away enum type in places where we don't wish to cover all cases. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The controller model is slightly unusual in that the default value is -1, not 0. As a result the default value is not covered by any of the existing enum cases. This in turn means that any switch() statements that think they have covered all cases, will in fact not match the default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags() method this has caused a serious mistake where we fallthrough from the SCSI controller case, to the VirtioSerial controller case, and from the USB controller case to the IDE controller case. By adding explicit enum constant starting at -1, we can ensure switches remember to handle the default case. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 2月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
During domain startup there are many places where we need to acquire secrets. Currently code passes around a virConnectPtr, except in the places where we pass in NULL. So there are a few codepaths where ability to start guests using secrets will fail. Change to acquire a handle to the secret driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Rather than expecting callers to pass a virConnectPtr into the virDomainDiskTranslateSourcePool() method, just acquire a connection to the storage driver when needed. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 2月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
This reverts commit 038eb472. On reflection adding defaults for arbitrary guest XML device config settings to the qemu.conf is not a sustainable path. Removing the support for rx/tx queue size so that it doesn't set a bad precedent. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 John Ferlan 提交于
Commit 'f0f2a5ec' neglected to adjust the if condition to split out the possibility that the @watchdog is NULL when altering the message to add detail about the model. Just split out the condition and use previous/original message, but with the new message code. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 09 2月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
The virStorageTranslateDiskSourcePool method modifies a virDomainDiskDef to resolve any storage pool reference. For some reason this was added into the storage driver code, despite working entirely in terms of the public APIs. Move it into the domain conf file and rename it to match the object it modifies. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Currently virt drivers will call directly into the network driver impl to allocate domain interface devices where type=network. This introduces a callback system to allow us to decouple the virt drivers from the network driver. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 02 2月, 2018 2 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1461214 Since fec8f9c4 we try to use predictable file names for 'memory-backend-file' objects. But that made us provide full path to qemu when hot plugging the object while previously we provided merely a directory. But this makes qemu behave differently. If qemu sees a path terminated with a directory it calls mkstemp() and unlinks the file immediately. But if it sees full path it just calls open(path, O_CREAT ..); and never unlinks the file. Therefore it's up to libvirt to unlink the file and not leave it behind. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
In 2074ef6c and c56cdf25 (and friends) we've added two attributes to virtio NICs: rx_queue_size and tx_queue_size. However, sysadmins might want to set these on per-host basis but don't necessarily have an access to domain XML (e.g. because they are generated by some other app). So let's expose them under qemu.conf (the settings from domain XML still take precedence as they are more specific ones). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 01 2月, 2018 4 次提交
-
-
由 Chen Hanxiao 提交于
Modify OPERATION_FAILED and INTERNAL_ERROR error codes to use DEVICE_MISSING instead for failures associated with the inability to find the device. This makes it easier for consumers to key off the error code rather than the error message. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Chen Hanxiao 提交于
More proper/detail error messages updated. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Now that the controller model is updated during post parse callback, this code no longer needs to fetch the model based on the capabilities and can just return the model directly if the controller is found. Removal of @qemuCaps cascades through various callers which are now updated to not pass the capabilities.
-
由 John Ferlan 提交于
If we're going to add a controller to the domain, let's set the default SCSI model value if we cannot find another SCSI controller already present. NB: Requires updating the live output test data since the model will now be formatted.
-
- 17 1月, 2018 1 次提交
-
-
由 Marc Hartmayer 提交于
Add a check if it's a iSCSI hostdev and if it's not then don't use the union member 'iscsi'. The segmentation fault occured when accessing secinfo->type, but this can vary from case to case. 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>
-
- 09 1月, 2018 1 次提交
-
-
由 Chen Hanxiao 提交于
Commit id '162efa1a' added support hotplug a redirdev, but did not add the hot unplug. This patch will add that support to allow usage of the detach-device --live on the device. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
-
- 04 1月, 2018 1 次提交
-
-
由 John Ferlan 提交于
When qemuDomainFindOrCreateSCSIDiskController adds a controller, let's use the same model as a currently found controller under the assumption that the reason to add the controller in hotplug is because virDomainHostdevAssignAddress determined that there were too many devices on the existing controller, but only assigned a new controller index and did not add a new controller and we desire to use the same controller model as any existing controller and not take a chance that qemuDomainSetSCSIControllerModel would use a default that may be incompatible.
-
- 21 12月, 2017 2 次提交
-
-
由 John Ferlan 提交于
Similar to qemuDomainAddChardevTLSObjects let's move the chardev source must be TCP and it has the @haveTLS flag set checks before trying to delete the TLS objects. For the Chr device this represents no change; however, for RNG device this is an additionaly check that was missed in commit id '68808516'. Before adding the objects, TCP and haveTLS are checked.
-
由 John Ferlan 提交于
Let's make a comment deletion helper similar to the Add helper that can be called after the ExitMonitor. The modify qemuDomainRemoveChrDevice and qemuDomainRemoveRNGDevice to call the helper instead of inlining the copy and pasted code.
-
- 15 12月, 2017 1 次提交
-
-
由 Laine Stump 提交于
When the <bandwidth> of an interface is changed with update-device, the old settings are cleared with tc, then new settings added with tc. But if the <bandwidth has been removed, the old settings weren't being removed, so the bandwidth restrictions would still be active on the interface although the interface status in libvirt showed that they had been removed. This patch fixes it by calling virNetDevBandwidthClear() if the "modification" to the interface bandwidth was to completely clear it. An alternative could have been to modify virNetDevBandwidthSet() to always clear existing bandwith settings at the beginning of the function (currently it short circuits in that case, doing nothing), but that would have led to cases where virNetDevBandwidthClear() was now being called in cases where it previously wasn't, and while many of those cases would be NOPs, there could be cases where it would cause an error. The way this patch works, the ...Clear() function is only called in cases where the ...Set() function had previously been called successfully, so the risk of regression is minimized. Resolves: https://bugzilla.redhat.com/1454709
-
- 14 12月, 2017 2 次提交
-
-
由 Ján Tomko 提交于
Also call qemuDomainRemoveInputDevice if we receive the event after the Detach API ends. Commit 67486bb2 failed to include this. https://bugzilla.redhat.com/show_bug.cgi?id=1524837Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Commit id 'c5c96545' neglected to validate that the srcPriv was non-NULL before dereferencing. Similar problem to what was fixed by commit id '8056721c' but missed during multiple rebases and code reworks.
-
- 06 12月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
The underlying function which needs the driver gets it from the passed virDomainObj object anyway.
-
- 05 12月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
Commit e93d844b was not enough to fix the permission denied issue. We need to apply security labels as well. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1465833Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 25 11月, 2017 3 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1425757 The blockdev-add code provides a mechanism to sanely provide user and password-secret arguments for iscsi without placing them on the command line to be viewable by a 'ps -ef' type command or needing to create separate -iscsi devices for each disk/volume found. So modify the iSCSI command line building to check for the presence of the capability in order properly setup and use the domain master secret object to encrypt the password in a secret object and alter the parameters for the command line to utilize. Modify the xml2argvtest to exhibit the syntax for both disk and hostdev configurations.
-
由 John Ferlan 提交于
Rather than picking apart the two pieces we need/want (path, hosts, and auth)- let's allocate/use a virStorageSourcePtr for iSCSI storage. The end result is that qemuBuildSCSIiSCSIHostdevDrvStr doesn't need to "fake" one for the qemuBuildNetworkDriveStr call.
-
由 Ján Tomko 提交于
Utilize all the newly introduced function to create the evdev node and label it on hotplug and destroy it on hotunplug. This was forgotten in commits bc9ffafc and 67486bb2. https://bugzilla.redhat.com/show_bug.cgi?id=1509866
-
- 24 11月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
Move the setup of the disk attribute to the disk source prepare function which will allow proper usage with JSON props and move the fallback (legacy) generating code into the block which is executed with legacy options. As a side-effect of this change we can clean up propagation of 'cfg' into the command generator. Also it's nice to see that the test output is the same even when the value is generated in a different place.
-
由 Peter Krempa 提交于
Aggregate setup of various aspects of a disk source (secrets, TLS, ...) into one function so that we don't need to call multiple across the code base.
-
由 Peter Krempa 提交于
Match the prefix of the file and choose a name which better describes what happens.
-
- 13 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
In some cases it does not make sense to pursue that the private data will be allocated (especially when we don't need to put anything in it). Ensure that the code works without it. This also fixes few crashes pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=1510323
-
- 08 11月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
At the same time, move its internals into a separate function so that they can be reused. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 03 11月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
When attaching the disks, aliases are always generated.
-
- 20 10月, 2017 2 次提交
-
-
由 John Ferlan 提交于
Since the encryption information can also be disk source specific move it from qemuDomainDiskPrivate to qemuDomainStorageSourcePrivate Since the last allocated element from qemuDomainDiskPrivate is removed, that means we no longer need qemuDomainDiskPrivateDispose. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 John Ferlan 提交于
Since the secret information is really virStorageSource specific piece of data, let's manage the privateData from there instead of at the Disk level. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 19 10月, 2017 2 次提交
-
-
由 Michal Privoznik 提交于
In the future, some aliases might be already parsed therefore we should avoid overwriting them. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Apart from killing a lot of code this also "implements" authentication and encryption for USB disks.
-