[libvirt] [PATCH v2 7/9] openvz: Ignore no-op flag during virDomainUndefine

Eric Blake posted 9 patches 6 years, 7 months ago
[libvirt] [PATCH v2 7/9] openvz: Ignore no-op flag during virDomainUndefine
Posted by Eric Blake 6 years, 7 months ago
Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op,
and in line with the recent doc tweak in commit c049f022.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 src/openvz/openvz_driver.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 39eeb2c12e..19c7db48ed 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1126,7 +1126,10 @@ openvzDomainUndefineFlags(virDomainPtr dom,
     int ret = -1;
     int status;

-    virCheckFlags(0, -1);
+    /* No managed save, so we explicitly reject
+     * VIR_DOMAIN_UNDEFINE_MANAGED_SAVE.  No snapshot metadata for
+     * openvz, so we can trivially ignore that flag.  */
+    virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1);

     openvzDriverLock(driver);
     if (!(vm = openvzDomObjFromDomainLocked(driver, dom->uuid)))
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 7/9] openvz: Ignore no-op flag during virDomainUndefine
Posted by Peter Krempa 6 years, 7 months ago
On Tue, Jul 09, 2019 at 12:46:36 -0500, Eric Blake wrote:
> Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op,
> and in line with the recent doc tweak in commit c049f022.
> 
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---

ACK
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list