* [PATCH][Xend] Fix disappearance of managed hvm domains on xend restart
@ 2007-03-14 0:24 Jim Fehlig
2007-03-29 22:47 ` Ewan Mellor
0 siblings, 1 reply; 2+ messages in thread
From: Jim Fehlig @ 2007-03-14 0:24 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
With c/s 14341, I noticed that managed HVM domains are not displayed by
'xm list' after restarting xend. When restarting xend and consequently
reading the managed domain config files, parsing fails on HVM domains
due to empty config items in the sexpr. So for example 'xm new
hvm_config_file' results in the following snippet from
/var/lib/xend/domains/<uuid>/config.sxp:
(platform
((fda )
(vncunused 1)
(fdb )
When xend is restarted and the various config files read/parsed, it
cannot cope with the config items containing no values (e.g. fda or fdb
above).
This patch prevents writing the config items when their values are
empty. Perhaps there is a more appropriate fix but this patch corrects
the described behavior.
Regards,
Jim
[-- Attachment #2: xend-managed-hvm.patch --]
[-- Type: text/x-patch, Size: 1392 bytes --]
# HG changeset patch
# User Jim Fehlig <jfehlig@novell.com>
# Date 1173831191 21600
# Node ID 7fce1e4ffe33a7d02d750a55f5527232ab6dbada
# Parent 127bee61972bfaf20150984d4860ba1b9359e8b3
Managed HVM guests are not displayed by 'xm list' after restarting xend.
This patch prevents writing empty configuration items to the domain's
sexpr configuration file. Without the empty items, the sexpr is
parsed properly when xend is started.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
diff -r 127bee61972b -r 7fce1e4ffe33 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Tue Mar 13 14:56:03 2007 +0000
+++ b/tools/python/xen/xend/XendConfig.py Tue Mar 13 18:13:11 2007 -0600
@@ -686,7 +686,7 @@ class XendConfig(dict):
for key in XENAPI_PLATFORM_CFG:
val = sxp.child_value(image_sxp, key, None)
- if val is not None:
+ if val is not None and val != '':
self['platform'][key] = val
notes = sxp.children(image_sxp, 'notes')
@@ -1310,7 +1310,7 @@ class XendConfig(dict):
for key in XENAPI_PLATFORM_CFG:
val = sxp.child_value(image_sxp, key, None)
- if val is not None:
+ if val is not None and val != '':
self['platform'][key] = val
notes = sxp.children(image_sxp, 'notes')
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][Xend] Fix disappearance of managed hvm domains on xend restart
2007-03-14 0:24 [PATCH][Xend] Fix disappearance of managed hvm domains on xend restart Jim Fehlig
@ 2007-03-29 22:47 ` Ewan Mellor
0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2007-03-29 22:47 UTC (permalink / raw)
To: Jim Fehlig; +Cc: xen-devel
On Tue, Mar 13, 2007 at 06:24:53PM -0600, Jim Fehlig wrote:
> With c/s 14341, I noticed that managed HVM domains are not displayed by
> 'xm list' after restarting xend. When restarting xend and consequently
> reading the managed domain config files, parsing fails on HVM domains
> due to empty config items in the sexpr. So for example 'xm new
> hvm_config_file' results in the following snippet from
> /var/lib/xend/domains/<uuid>/config.sxp:
>
> (platform
> ((fda )
> (vncunused 1)
> (fdb )
>
> When xend is restarted and the various config files read/parsed, it
> cannot cope with the config items containing no values (e.g. fda or fdb
> above).
>
> This patch prevents writing the config items when their values are
> empty. Perhaps there is a more appropriate fix but this patch corrects
> the described behavior.
Applied, thank you, and sorry for the delay.
Ewan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-29 22:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-14 0:24 [PATCH][Xend] Fix disappearance of managed hvm domains on xend restart Jim Fehlig
2007-03-29 22:47 ` Ewan Mellor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.