- 09 8月, 2019 5 次提交
-
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. This patch fixes all paths leading to virDomainDefParseString. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. This patch fixes all paths leading to qemuMigrationAnyPrepareDef. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. This patch fixes all paths leading to qemuDomainSaveImageOpen. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. This patch fixes all paths leading to qemuDomainDefFormatBufInternal. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Since qemuDomainDefPostParse callback requires qemuCaps, we need to make sure it gets the capabilities stored in the domain's private data if the domain is running. Passing NULL may cause QEMU capabilities probing to be triggered in case QEMU binary changed in the meantime. When this happens while a running domain object is locked, QMP event delivered to the domain before QEMU capabilities probing finishes will deadlock the event loop. This patch fixes all paths leading to qemuDomainDefCopy. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 8月, 2019 2 次提交
-
-
由 John Ferlan 提交于
If virQEMUDriverGetCapabilities returns NULL, then a subsequent deref of @caps would cause an error, so we just return failure. Found by Coverity Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Cole Robinson 提交于
For now it's just a helper for building a qemu virDomainCapsPtr, used in qemuConnectGetDomainCapabilities Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 06 8月, 2019 6 次提交
-
-
由 Michal Privoznik 提交于
This way it is obvious when adding a new resource control type that stats helper func needs to be updated too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
If the host doesn't have resctrl then the monitor is going to be NULL and we must avoid dereferencing it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Michal Privoznik 提交于
The capabilities object must be unrefed when no longer needed. Use VIR_AUTOUNREF() for that. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Wang Huaqiang 提交于
Export virResctrlMonitorGetStats and make virResctrlMonitorGetCacheOccupancy obsoleted. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Huaqiang 提交于
Refactor 'virResctrlMonitorStats' to track multiple statistical records. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Huaqiang 提交于
Refactor and rename 'virResctrlMonitorFreeStats' to 'virResctrlMonitorStatsFree' to free one 'virResctrlMonitorStatsPtr' object. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 29 7月, 2019 6 次提交
-
-
由 Eric Blake 提交于
Earlier patches mentioned that the initial implementation will prevent snapshots and checkpoints from being used on the same domain at once. However, the actual restriction is done in this separate patch to make it easier to lift that restriction via a revert, when we are finally ready to tackle that integration in the future. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Eric Blake 提交于
Time to actually issue the QMP transactions that create and delete persistent checkpoints, resolving TODOs intentionally left earlier in the series. For create, we only need one transaction: inside, we visit all disks affected by the checkpoint, and create a new enabled bitmap, as well as disabling the bitmap of the first ancestor checkpoint (if any) that also had a bitmap. For deletion, we need multiple QMP calls: for each disk, if there is an ancestor checkpoint with a bitmap, then the bitmap must be merged (including activating the ancestor bitmap if the leaf node changes), all before deleting the bitmap from the checkpoint being removed. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
A lot of this work heavily copies from the existing snapshot APIs. What's more, this patch is (intentionally) very similar to the checkpoint code just added in the test driver, to the point that qemu checkpoints are not fully usable in this patch, but it at least bisects and builds cleanly. The separation between patches is done because the grunt work of saving and restoring XML and tracking relations between checkpoints is common to the test driver, while the later patch adding integration with QMP is specific to qemu. Also note that the interlocking to prevent checkpoints and snapshots from existing at the same time will be a separate patch, to make it easier to revert that restriction when we finally round out the design for supporting interaction between the two concepts. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
This is similar to the existing directory for snapshots; the domain will save one xml file per checkpoint, for reloading on the next libvirtd restart. Fortunately, since checkpoints mandate RNG validation, we are assured that the checkpoint name will be usable as a file name (no abuse of '../escape' as a checkpoint name, for example). Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
Introduce the handler for finalizing a block commit and active bloc commit job which will allow to use it with blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Introduce the handler for finalizing a block pull job which will allow to use it with blockdev. This patch also contains some additional machinery which is required to store all the relevant job data in the status XML which will also be reused with other block job types. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 26 7月, 2019 1 次提交
-
-
由 Stefan Berger 提交于
Since swtpm does not support getting started without password once it was created with encryption enabled, we don't allow encryption to be removed. Similarly, we do not allow encryption to be added once swtpm has run. We also prevent chaning the type of the TPM backend since the encrypted state is still around and the next time one was to switch back to the emulator backend and forgot the encryption the TPM would not work. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 7月, 2019 10 次提交
-
-
由 Peter Krempa 提交于
qemuDomainSnapshotDiskDataCollect copies the source of the disk from the live config into the inactive config. Move this operation earlier so that if we initialize it for use for the particular instance the run-time-only data is not copied. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The block commit API checked 'disk->src->path' to see whether there is a reasonable disk source to be committed. As the top image can be e.g. backed by NBD the check is not good enough. Replace it by virStorageSourceIsEmpty. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Now that we track the job separately we watch only for the abort of the one single block job so the comment is no longer accurate. Also describing asynchronous operation is not really necessary. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With -blockdev: - we track the job and check it after restart - have the ability to ask qemu to persist it to collect result - have the ability to report errors. This solves all points the comment outlined so remove it. Also all jobs handle the disk state modification along with the event so there's nothing special the comment says. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use job-complete/job-abort instead of the blockjob-* variants for blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
As the error message is now available and we know whether the job failed we can report an error straight away rather than having the user check the event. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Set the correct job states after the operation is requested in qemu. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Do decisions based on the configuration of the job rather than the data stored with the disk. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the stored job name rather than passing in the disk alias when referring to the job which allows the same code to work also when -blockdev will be used. Note that this API does not require the change to use 'query-job' as it will ever only work with blockjobs bound to disks due to the arguments which allow only referring to a disk. For the disk-less jobs we'll need to add a separate API later. The change to qemuMonitorGetBlockJobInfo is required as the API was stripping the 'drive-' prefix when returning the data which is not desired any more. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Eric Blake 提交于
virDomainSnapshotFindByName(list, NULL) should return NULL, rather than the internal-use-only metaroot. Most existing callers pass in a non-NULL name; the few external callers that don't are immediately calling virDomainMomentSetParent (which indeed needs the metaroot rather than NULL if the parent name is NULL); but as the leaky abstraction is ugly, it is worth instead making virDomainMomentSetParent static and adding a new function for resolving the parent link of a brand new moment within its list. The existing external uses of virDomainMomentSetParent always succeed (either the new moment has parent_name of NULL to become a new root, or has parent_name set to a strdup of the previous current moment); hence, our new function does not need a return value (but it still has a VIR_WARN in case future uses break our assumptions about failure being impossible). Missed when commit 02c4e24d refactored things to attempt to remove direct metaroot manipulations out of the qemu and test drivers into internal-only details, and made more obvious when commit dc8d3dc6 factored it out into a separate file. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 19 7月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
Report in logs when we don't find existing block job data and create it just to handle the job. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
While this function does start a block job in case when we'd not be able to get our internal data for it, the handler sets the job state to QEMU_BLOCKJOB_STATE_RUNNING anyways, thus qemuBlockJobStartupFinalize would just unref the job. Since the other usage of qemuBlockJobStartupFinalize in the other part of the event handler was a bug replace this one anyways even if it would not cause problems. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 18 7月, 2019 7 次提交
-
-
由 Peter Krempa 提交于
The PR manager is a property of the format layer in qemu so we need to be able to track it also in the chains of orphaned block jobs. Add a helper for qemu to look also into the blockjob state. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add support for handling the event either synchronously or asynchronously using the event thread. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Now that the blockjob handling code deals with the status XML we don't need to save it explicitly when starting blockjobs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Now that block job data is stored in the status XML portion we need to make sure that everything which changes the state also saves the status XML. The job registering function is used while parsing the status XML so in that case we need to skip the XML saving. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Add the job structure to the table when instantiating a new job and remove it when it terminates/fails. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow using the node name to specify the base and top of the 'commit' operation, allow specifying explicit job name and add support for delayed dismiss of the job so that we can reap the state even if libvirtd was not running when qemu emitted the job completion event. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Allow using the node name to specify the base of the 'stream' operation, allow specifying explicit job name and add support for delayed dismiss of the job so that we can reap the state even if libvirtd was not running when qemu emitted the job completion event. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 15 7月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
When the drivers acquire their pidfile lock we don't want to wait if the lock is already held. We need the driver to immediately report error, causing the daemon to exit. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-