* [PATCH] Close nvram file when rebooting HVM domain
@ 2007-12-11 2:11 Masaki Kanno
2007-12-11 15:57 ` [Xen-ia64-devel] " Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Masaki Kanno @ 2007-12-11 2:11 UTC (permalink / raw)
To: xen-devel; +Cc: xen-ia64-devel
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 1081 bytes --]
Hi,
On ia64, when I rebooted a HVM domain, a nvram file for the HVM domain
was not closed. When I repeated rebooting the HVM domain, a lot of the
nvram files have still opened as follows.
# ps aux | grep xend
root 4215 0.0 0.2 81600 11840 ? S 10:00 0:00 python /usr/sbin/xend start
root 4221 0.3 0.7 223664 29136 ? Sl 10:00 0:03 python /usr/sbin/xend start
root 5189 0.0 0.0 60432 1824 pts/0 S+ 10:17 0:00 grep xend
# ls -l /proc/4221/fd | grep nvram
lrwx------ 1 root root 64 Dec 11 10:05 23 -> /var/lib/xen/nvram/nvram_HVMdomain.1
lrwx------ 1 root root 64 Dec 11 10:14 24 -> /var/lib/xen/nvram/nvram_HVMdomain.1
lrwx------ 1 root root 64 Dec 11 10:14 25 -> /var/lib/xen/nvram/nvram_HVMdomain.1
lrwx------ 1 root root 64 Dec 11 10:16 26 -> /var/lib/xen/nvram/nvram_HVMdomain.1
lrwx------ 1 root root 64 Dec 11 10:08 4 -> /var/lib/xen/nvram/nvram_HVMdomain.1
This patch closes a nvram file for a HVM domain when the HVM domain
rebooted.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Best regards,
Kan
[-- Attachment #2: close_nvram_file.patch --]
[-- Type: application/octet-stream, Size: 784 bytes --]
diff -r 4054cd60895b tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Dec 10 13:49:22 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Mon Dec 10 18:44:37 2007 +0900
@@ -1880,8 +1880,6 @@ class XendDomainInfo:
self._cleanupVm()
if self.dompath is not None:
- if self.domid is not None:
- xc.domain_destroy_hook(self.domid)
self.destroyDomain()
self._cleanup_phantom_devs(paths)
@@ -1899,6 +1897,7 @@ class XendDomainInfo:
try:
if self.domid is not None:
+ xc.domain_destroy_hook(self.domid)
xc.domain_destroy(self.domid)
for state in DOM_STATES_OLD:
self.info[state] = 0
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xen-ia64-devel] [PATCH] Close nvram file when rebooting HVM domain
2007-12-11 2:11 [PATCH] Close nvram file when rebooting HVM domain Masaki Kanno
@ 2007-12-11 15:57 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2007-12-11 15:57 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Masaki Kanno, xen-ia64-devel
On Tue, 2007-12-11 at 11:11 +0900, Masaki Kanno wrote:
>
> Hi,
>
> On ia64, when I rebooted a HVM domain, a nvram file for the HVM domain
> was not closed. When I repeated rebooting the HVM domain, a lot of the
> nvram files have still opened as follows.
>
> # ps aux | grep xend
> root 4215 0.0 0.2 81600 11840 ? S 10:00 0:00 python /usr/sbin/xend start
> root 4221 0.3 0.7 223664 29136 ? Sl 10:00 0:03 python /usr/sbin/xend start
> root 5189 0.0 0.0 60432 1824 pts/0 S+ 10:17 0:00 grep xend
> # ls -l /proc/4221/fd | grep nvram
> lrwx------ 1 root root 64 Dec 11 10:05 23 -> /var/lib/xen/nvram/nvram_HVMdomain.1
> lrwx------ 1 root root 64 Dec 11 10:14 24 -> /var/lib/xen/nvram/nvram_HVMdomain.1
> lrwx------ 1 root root 64 Dec 11 10:14 25 -> /var/lib/xen/nvram/nvram_HVMdomain.1
> lrwx------ 1 root root 64 Dec 11 10:16 26 -> /var/lib/xen/nvram/nvram_HVMdomain.1
> lrwx------ 1 root root 64 Dec 11 10:08 4 -> /var/lib/xen/nvram/nvram_HVMdomain.1
>
> This patch closes a nvram file for a HVM domain when the HVM domain
> rebooted.
>
>
> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir,
This would be a nice fix to get in for 3.2. Thanks
Alex
Acked-by: Alex Williamson <alex.williamson@hp.com>
>
> diff -r 4054cd60895b tools/python/xen/xend/XendDomainInfo.py
> --- a/tools/python/xen/xend/XendDomainInfo.py Mon Dec 10 13:49:22
> 2007 +0000
> +++ b/tools/python/xen/xend/XendDomainInfo.py Mon Dec 10 18:44:37
> 2007 +0900
> @@ -1880,8 +1880,6 @@ class XendDomainInfo:
>
> self._cleanupVm()
> if self.dompath is not None:
> - if self.domid is not None:
> - xc.domain_destroy_hook(self.domid)
> self.destroyDomain()
>
> self._cleanup_phantom_devs(paths)
> @@ -1899,6 +1897,7 @@ class XendDomainInfo:
>
> try:
> if self.domid is not None:
> + xc.domain_destroy_hook(self.domid)
> xc.domain_destroy(self.domid)
> for state in DOM_STATES_OLD:
> self.info[state] = 0
>
--
Alex Williamson HP Open Source & Linux Org.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-11 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-11 2:11 [PATCH] Close nvram file when rebooting HVM domain Masaki Kanno
2007-12-11 15:57 ` [Xen-ia64-devel] " Alex Williamson
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.