[Kimchi-devel] [PATCH v2] Supress error messages while checking vm metadata
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Tue Apr 28 14:19:57 UTC 2015
Changes
v2: Use parse functions present on model/utils.py
The function FeatureTests.disable_libvirt_error_logging only removes the
error message that will be displayed on the console. Libvirt also logs
errors on messages log. To avoid flood messages log with metadata
errors, it will be verified manually if the xml has the tag.
Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
---
src/kimchi/model/utils.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/kimchi/model/utils.py b/src/kimchi/model/utils.py
index b2739b2..1b114f6 100644
--- a/src/kimchi/model/utils.py
+++ b/src/kimchi/model/utils.py
@@ -95,6 +95,9 @@ def _kimchi_set_metadata_node(dom, node):
def libvirt_get_kimchi_metadata_node(dom, mode="current"):
+ if _kimchi_get_metadata_node(dom, "metadata") == None:
+ return
+
FeatureTests.disable_libvirt_error_logging()
try:
xml = dom.metadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT,
--
2.1.0
More information about the Kimchi-devel
mailing list