[PATCH 1/3] libxl: add a flag to mark guests as tainted by a hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The migrate hook will affect the migrated guest definition. Allow
these domains be marked as tainted in the libxl driver.
---
 src/libxl/libxl_domain.c | 10 ++++++++++
 src/libxl/libxl_domain.h |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 0e26b91..886b40f 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -1135,6 +1135,16 @@ libxlDomainStart(libxlDriverPrivatePtr driver,
                                        vm->def, hostdev_flags) < 0)
         goto cleanup_dom;
 
+    if (priv->hookRun) {
+        char uuidstr[VIR_UUID_STRING_BUFLEN];
+        virUUIDFormat(vm->def->uuid, uuidstr);
+
+        VIR_WARN("Domain id='%d' name='%s' uuid='%s' is tainted: hook",
+                 vm->def->id,
+                 vm->def->name,
+                 uuidstr);
+    }
+
     /* Unlock virDomainObj while creating the domain */
     virObjectUnlock(vm);
 
diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h
index af11a2c..3a3890b 100644
--- a/src/libxl/libxl_domain.h
+++ b/src/libxl/libxl_domain.h
@@ -69,6 +69,8 @@ struct _libxlDomainObjPrivate {
     char *lockState;
 
     struct libxlDomainJobObj job;
+
+    bool hookRun;  /* true if there was a hook run over this domain */
 };
 
 
-- 
2.6.6

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]