[libvirt PATCH 11/11] domain_snapshot: update virDomainRevertToSnapshot description

Pavel Hrdina posted 11 patches 4 years, 2 months ago
[libvirt PATCH 11/11] domain_snapshot: update virDomainRevertToSnapshot description
Posted by Pavel Hrdina 4 years, 2 months ago
We've changed the behavior of this API that from now on it will always
restart the VM process and we are no longer able to revert to snapshots
created by libvirt older then 0.9.5.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 src/libvirt-domain-snapshot.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c
index 4a79e95704..99316460aa 100644
--- a/src/libvirt-domain-snapshot.c
+++ b/src/libvirt-domain-snapshot.c
@@ -960,6 +960,11 @@ virDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
  * implies the intent to roll back state, no additional confirmation is
  * normally required for these lossy effects.
  *
+ * Since libvirt 7.10.0 the VM process is always restarted so the following
+ * paragraph is no longer valid. In case that the snapshot metadata lacks
+ * full VM XML we will error out as it is no longer possible to revert to
+ * these old snapshots.
+ *
  * However, there are two particular situations where reverting will
  * be refused by default, and where @flags must include
  * VIR_DOMAIN_SNAPSHOT_REVERT_FORCE to acknowledge the risks.  1) Any
-- 
2.31.1

Re: [libvirt PATCH 11/11] domain_snapshot: update virDomainRevertToSnapshot description
Posted by Peter Krempa 4 years, 2 months ago
On Mon, Nov 15, 2021 at 17:22:54 +0100, Pavel Hrdina wrote:
> We've changed the behavior of this API that from now on it will always
> restart the VM process and we are no longer able to revert to snapshots
> created by libvirt older then 0.9.5.
> 
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
>  src/libvirt-domain-snapshot.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/libvirt-domain-snapshot.c b/src/libvirt-domain-snapshot.c
> index 4a79e95704..99316460aa 100644
> --- a/src/libvirt-domain-snapshot.c
> +++ b/src/libvirt-domain-snapshot.c
> @@ -960,6 +960,11 @@ virDomainSnapshotHasMetadata(virDomainSnapshotPtr snapshot,
>   * implies the intent to roll back state, no additional confirmation is
>   * normally required for these lossy effects.
>   *
> + * Since libvirt 7.10.0 the VM process is always restarted so the following
> + * paragraph is no longer valid. In case that the snapshot metadata lacks
> + * full VM XML we will error out as it is no longer possible to revert to

"If the snapshot metadata lacks the full VM XML it's no longer possible
to revert to such snapshot."

Instead of the last sentence.

Additionally you should add a similar notice to the virsh man page
(separate commit).

Reviewed-by: Peter Krempa <pkrempa@redhat.com>