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

[Xen-changelog] [xen master] xend: Only add cpuid and cpuid_check to sexpr once



commit 4b5059be627aa68e5cd6ef344b21ce6743f3f9df
Author:     Olaf Hering <olaf@xxxxxxxxx>
AuthorDate: Thu Feb 14 17:18:56 2013 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Fri Feb 22 16:35:28 2013 +0000

    xend: Only add cpuid and cpuid_check to sexpr once
    
    tools/xend: Only add cpuid and cpuid_check to sexpr once
    
    When converting a XendConfig object to sexpr, cpuid and cpuid_check
    were being emitted twice in the resulting sexpr.  The first conversion
    writes incorrect sexpr, causing parsing of the sexpr to fail when xend
    is restarted and domain sexpr files in /var/lib/xend/domains/<dom-uuid>
    are read and parsed.
    
    This patch skips the first conversion, and uses only the custom
    cpuid{_check} conversion methods called later.  It is not pretty, but
    is the least invasive fix in this complex code.
    
    Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/python/xen/xend/XendConfig.py 
b/tools/python/xen/xend/XendConfig.py
index 497a5f4..4a226a7 100644
--- a/tools/python/xen/xend/XendConfig.py
+++ b/tools/python/xen/xend/XendConfig.py
@@ -1124,6 +1124,10 @@ class XendConfig(dict):
         else:
             for name, typ in XENAPI_CFG_TYPES.items():
                 if name in self and self[name] not in (None, []):
+                    # Skip cpuid and cpuid_check.  Custom conversion
+                    # methods for these are called below.
+                    if name in ("cpuid", "cpuid_check"):
+                        continue
                     if typ == dict:
                         s = self[name].items()
                     elif typ == list:
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.