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-changelog

[Xen-changelog] [xen-unstable] xend: Fix cleanup_domains() for suspendin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Fix cleanup_domains() for suspending managed domains
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Dec 2007 13:50:17 -0800
Delivery-date: Wed, 12 Dec 2007 13:50:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1197454094 0
# Node ID 7b4e560d6caf25fe43edd3d5a86701f8cbc992f8
# Parent  e502e8308e46bf80b9c1fd6c32f4000ea6a62295
xend: Fix cleanup_domains() for suspending managed domains

When unmanaged domains with on_xend_stop="suspend" exist, managed
domains are not suspended by xend stop command.  The processing of
cleanup_domains() is aborted by exception. This patch keeps suspending
managed domains even if unmanaged domains exist.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff -r e502e8308e46 -r 7b4e560d6caf tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Wed Dec 12 10:05:53 2007 +0000
+++ b/tools/python/xen/xend/XendDomain.py       Wed Dec 12 10:08:14 2007 +0000
@@ -613,13 +613,19 @@ class XendDomain:
                 if dom.getName() == DOM0_NAME:
                     continue
                 
-                if dom._stateGet() == DOM_STATE_RUNNING:
-                    shutdownAction = dom.info.get('on_xend_stop', 'ignore')
-                    if shutdownAction == 'shutdown':
-                        log.debug('Shutting down domain: %s' % dom.getName())
-                        dom.shutdown("poweroff")
-                    elif shutdownAction == 'suspend':
-                        self.domain_suspend(dom.getName())
+                try:
+                    if dom._stateGet() == DOM_STATE_RUNNING:
+                        shutdownAction = dom.info.get('on_xend_stop', 'ignore')
+                        if shutdownAction == 'shutdown':
+                            log.debug('Shutting down domain: %s' % 
dom.getName())
+                            dom.shutdown("poweroff")
+                        elif shutdownAction == 'suspend':
+                            self.domain_suspend(dom.getName())
+                        else:
+                            log.debug('Domain %s continues to run.' % 
dom.getName())
+                except:
+                    log.exception('Domain %s failed to %s.' % \
+                                  (dom.getName(), shutdownAction))
         finally:
             self.domains_lock.release()
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Fix cleanup_domains() for suspending managed domains, Xen patchbot-unstable <=