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

Eric Blake eblake at redhat.com
Tue Jul 9 17:46:36 UTC 2019


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 at 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




More information about the libvir-list mailing list