- 15 7月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Add separate booleans for extracting VIR_DOMAIN_BLOCK_COPY_REUSE_EXT and VIR_DOMAIN_BLOCK_COPY_SHALLOW from '@flags' and also change 'reuse' into 'existing'. qemuMonitorDriveMirror requires the unmodified state of the flags to pass to qemu and also we use the value a few times internally. Extract it separately now. The 'reuse' flag did not indicate reusing of the file as much as the fact that the storage is existing and thus should not be created, so modify the name to reflect this. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 11 7月, 2019 2 次提交
-
-
由 Daniel P. Berrangé 提交于
When we allow multiple instances of the driver for the same user account, using a separate root directory, we need to ensure mutual exclusion. Use a pidfile to guarantee this. In privileged libvirtd this ends up locking /var/run/libvirt/qemu/driver.pid In unprivileged libvirtd this ends up locking /run/user/$UID/libvirt/qemu/run/driver.pid NB, the latter can vary depending on $XDG_RUNTIME_DIR Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Eric Blake 提交于
We've been doing a terrible job of performing XML validation in our various API that parse XML with a corresponding schema (we started with domains back in commit dd69a14f, v1.2.12, but didn't catch all domain-related APIs, didn't document the use of the flag, and didn't cover other XML). New APIs (like checkpoints) should do the validation unconditionally, but it doesn't hurt to continue retrofitting existing APIs to at least allow the option. While there are many APIs that could be improved, this patch focuses on wiring up a new snapshot XML creation flag through all the hypervisors that support snapshots, as well as exposing it in 'virsh snapshot-create'. For 'virsh snapshot-create-as', we blindly set the flag without a command-line option, since the XML we create from the command line should generally always comply (note that validation might cause failures where it used to succeed, such as if we tighten the RNG to reject a name of '../\n'); but blindly passing the flag means we also have to add in fallback code to disable validation if the server is too old to understand the flag. Signed-off-by: NEric Blake <eblake@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
- 08 7月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1692296#c7 This is a counterpart for ddc72f99 and implements the same check for coldplug. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 03 7月, 2019 2 次提交
-
-
由 Ilias Stamatis 提交于
Calling virDomainObjUpdateModificationImpact directly inside the function body is redundant, since the same function call is embedded into virDomainObjGetOneDef. Signed-off-by: NIlias Stamatis <stamatis.iliass@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NCole Robinson <crobinso@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 27 6月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The public API entry points will report VIR_ERR_NO_SUPPORT to the caller when a driver does not provide an implementation of a particular method. When deleting methods, leaving the driver API entry point explicitly set to NULL with an version range comment, allows the hvsupport.html page to document when the AP was removed. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 26 6月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
We've deprecated qemuConnectDomainXMLFromNative qemuDomainQemuAttach. Switch the error code from VIR_ERR_OPERATION_UNSUPPORTED to the new VIR_ERR_DEPRECATED. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 20 6月, 2019 5 次提交
-
-
由 Peter Krempa 提交于
Commit f34397e5 introduced a crash-inducing problem when collecting disk snapshot data, where the array would be filled starting from the second element. The code then dereferenced the first one. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
The virDomainSaveImageGetXMLDesc API is taking a path parameter, which can point to any path on the system. This file will then be read and parsed by libvirtd running with root privileges. Forbid it on read-only connections. Fixes: CVE-2019-10161 Reported-by: NMatthias Gerstner <mgerstner@suse.de> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Now that we no longer support the HMP monitor, remove some dead code. Signed-off-by: NJán Tomko <jtomko@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
This code is really neglected and does not at all work reliably. It can't even be used for converting our own commandline back. Since this was mostly useful for aiding migration from manually run qemu to libvirt and will not work for this puspose in many cases it's not worth having. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Peter Krempa 提交于
Attaching to modern qemu will not work with all this code and attempting to ressurect it would be mostly pointless. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 17 6月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The current qemu driver code for changing bandwidth on a NIC first asks the network driver if the change is supported, then changes the bandwidth on the VIF, and then tells the network driver to update the bandwidth on the bridge. This is potentially racing if a parallel API call causes the network driver to allocate bandwidth on the bridge between the check and the update phases. Change the code to just try to apply the network bridge update immediately and rollback at the end if something failed. Reviewed-by: NLaine Stump <laine@laine.org> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 10 6月, 2019 14 次提交
-
-
由 Peter Krempa 提交于
Now that we never get to the actual snapshot code if there's nothing to do we can remove the variable and surrounding logic. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Skip actual snapshot creation code if we have 0 disks to snapshot. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
All cases taking the 'cleanup' path can take the original 'error' path. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce 'rc' for collecting state from monitor commands so that we can initialize 'ret' to -1. This also fixes few cases which could return 0 from the function despite an error condition. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
qemuDomainSnapshotDiskDataFree also removes the resources associated with the disk data. Move the unlinking of the just-created file so that we can unify the cleanup paths. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In commit cbb4d229 I named the function with 'free' suffix, but at that time it already did some non-freeing tasks. Rename it to make it obvious that it's not just memory managemet. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The function skips disks which are not selected for snapshot. Rather than creating a sparse array and check whether the given field is filled compress the entries. Note that this does not allocate a smaller array, but the memory allocation is short-lived. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
If there's an offline config definition save it unconditionally even if it was not modified. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The error path is unlikely thus saving the status XML even if we didn't modify it does not add much burden. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
After getting rid of pre-transaction qemu support the cleanup section is unused. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The caller has it so there's no point in getting it again. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 21 5月, 2019 11 次提交
-
-
由 Peter Krempa 提交于
Split out the 'shallow' and 'reuse' flags as booleans rather than passing in flags and constructing them in irrelevant APIs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
At the point when we want to modify the permissions for the 'mirror' we know whether it is supposed to have a backing chain or no. Given that mirror->backingStore is populated only when we'd need to touch it ayways we can use qemuDomainStorageSourceChainAccessAllow even in place of qemuDomainStorageSourceAccessAllow used for other cases to simplify the code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
One code path open-coded qemuDomainStorageSourceChainAccessAllow badly and also did not integrate with the locking code. Replace the separate calls with qemuDomainStorageSourceChainAccessAllow which does everything internally. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Since 4e797f1a we parse backingStore of mirror which will later be used with blockdev. Add some validation for the user passed mirror at the current point to make sure it's not used improperly. Validate that it's not used without blockdev and also that it's not passed when not requesting a shallow copy. Also add a chain terminator for a deep copy since we know the resulting mirror will not have chain. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Since 3decae00 qemuDomainStorageSourceAccessAllow revokes the permissions it granted if it fails halfway, thus we can remove some calls to qemuDomainStorageSourceAccessRevoke which tried to undo this situation. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Since 3decae00 qemuDomainStorageSourceAccessRevoke keeps the libvirt error which was set prior to the call around even after the call, thus we don't need to do the same when reverting access in the block copy code. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use VIR_AUTOFREE and VIR_AUTOUNREF. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use VIR_AUTOFREE and VIR_AUTOUNREF. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use VIR_AUTOFREE, VIR_AUTOUNREF, and VIR_STEAL_PTR. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When aborting or pivoting a block job we record which operation we do for the mirror in the virDomainDiskDef structure. As everything is synchronized by a job it's not necessary to modify the state prior to calling the monitor and resetting the state on failure. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
All blockjobs get their status updated by events from qemu, so this code no longer makes sense. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 20 5月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
This reverts commit dfd70ca1. Pushed by a mistake, sorry. There's still some discussion going on upstream. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-