WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix xm shutdown for xendomains

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix xm shutdown for xendomains
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Tue, 08 Apr 2008 16:41:46 +0900
Delivery-date: Tue, 08 Apr 2008 00:42:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

When I tested xm shutdown command with a domain name, xm shutdown command 
waited for a shutdown completion of a guest OS as I had expected. 
But, when I tested xm shutdown command with a domain ID, xm shutdown 
command did not wait for it. 

Domain name:
 # time xm shutdown vm1 --wait
 Domain vm1 terminated
 All domains terminated
 
 real    0m21.093s
 user    0m0.490s
 sys     0m0.090s
 # xm list
 Name                                        ID   Mem VCPUs      State   Time(s)
 Domain-0                                     0   743     2     r-----    272.6

Domain ID:
 # time xm shutdown 9 --wait
 Domain 9 terminated
 All domains terminated
 
 real    0m1.551s
 user    0m0.410s
 sys     0m0.060s
 # xm list
 Name                                        ID   Mem VCPUs      State   Time(s)
 Domain-0                                     0   743     2     r-----    262.3
 vm1                                          9   256     1     r-----     34.1


I think that this problem has an impact to shutting down guest OSes by 
xendomains because xendomains uses xm shutdown command with the domain 
ID.  Guest OSes may be not shut down as expected because xm shutdown 
command is executed twice in the short term as follows. 

 # service xendomains stop
 Shutting down Xen domains: vm1(shut).Domain 7 terminated
 All domains terminated
  SHUTDOWN_ALL ...Domain vm1 terminated
 All domains terminated
 /etc/init.d/xendomains: line 318:  6736 Terminated              watchdog_xm 
shutdown
 /etc/init.d/xendomains: line 318:  6768 Terminated              watchdog_xm 
shutdown 1


This patch solves the problem.  Even if xm shutdown command with the 
domain ID, xm shutdown command waits for the shutdown completion of 
guest OSes. 

 # time xm shutdown 11 --wait
 Domain vm1 terminated
 All domains terminated
 
 real    0m21.678s
 user    0m0.540s
 sys     0m0.030s

 # service xendomains stop
 Shutting down Xen domains: vm1(shut)............Domain vm1 terminated
 All domains terminated
 /etc/init.d/xendomains: line 280:  8236 Terminated              watchdog_xm 
shutdown
 /etc/init.d/xendomains: line 318:  8236 Terminated              watchdog_xm 
shutdown


Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

Attachment: xm_shutdown_wait.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix xm shutdown for xendomains, Masaki Kanno <=