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 domain core-dumping about reset

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Fix domain core-dumping about reset option
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Mar 2009 00:50:10 -0700
Delivery-date: Fri, 13 Mar 2009 00:50:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 1236929885 0
# Node ID 3c1a88dc6fbea03d4cbba5101f3ffcfcc065f3e9
# Parent  2377bb2d03164c3e145c524729981b6fbedb67df
xend: Fix domain core-dumping about reset option

This patch moves a call processing of a domain reset processing
from xm to xend.  Also, it adds a reset argument to do_dump() of
SrvDomain.py.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py       |   10 ++++++----
 tools/python/xen/xend/server/SrvDomain.py |    3 ++-
 tools/python/xen/xm/main.py               |    4 +---
 3 files changed, 9 insertions(+), 8 deletions(-)

diff -r 2377bb2d0316 -r 3c1a88dc6fbe tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Fri Mar 13 07:37:24 2009 +0000
+++ b/tools/python/xen/xend/XendDomain.py       Fri Mar 13 07:38:05 2009 +0000
@@ -1223,7 +1223,7 @@ class XendDomain:
             log.exception("domain_pause")
             raise XendError(str(ex))
 
-    def domain_dump(self, domid, filename, live, crash):
+    def domain_dump(self, domid, filename=None, live=False, crash=False, 
reset=False):
         """Dump domain core."""
 
         dominfo = self.domain_lookup_nr(domid)
@@ -1244,15 +1244,17 @@ class XendDomain:
         try:
             try:
                 log.info("Domain core dump requested for domain %s (%d) "
-                         "live=%d crash=%d.",
-                         dominfo.getName(), dominfo.getDomid(), live, crash)
+                         "live=%d crash=%d reset=%d.",
+                         dominfo.getName(), dominfo.getDomid(), live, crash, 
reset)
                 dominfo.dumpCore(filename)
                 if crash:
                     self.domain_destroy(domid)
+                elif reset:
+                    self.domain_reset(domid)
             except Exception, ex:
                 raise XendError(str(ex))
         finally:
-            if dopause and not crash:
+            if dopause and not crash and not reset:
                 dominfo.unpause()
 
     def domain_destroy(self, domid):
diff -r 2377bb2d0316 -r 3c1a88dc6fbe tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Fri Mar 13 07:37:24 2009 +0000
+++ b/tools/python/xen/xend/server/SrvDomain.py Fri Mar 13 07:38:05 2009 +0000
@@ -104,7 +104,8 @@ class SrvDomain(SrvDir):
                     [['dom',         'int'],
                      ['file',        'str'],
                      ['live',        'int'],
-                     ['crash',       'int']])
+                     ['crash',       'int'],
+                     ['reset',       'int']])
         return fn(req.args, {'dom': self.dom.domid})
 
     def op_migrate(self, op, req):
diff -r 2377bb2d0316 -r 3c1a88dc6fbe tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Fri Mar 13 07:37:24 2009 +0000
+++ b/tools/python/xen/xm/main.py       Fri Mar 13 07:38:05 2009 +0000
@@ -1352,9 +1352,7 @@ def xm_dump_core(args):
         filename = None
 
     print "Dumping core of domain: %s ..." % str(dom)
-    server.xend.domain.dump(dom, filename, live, crash)
-    if reset:
-        server.xend.domain.reset(dom)
+    server.xend.domain.dump(dom, filename, live, crash, reset)
 
 def xm_rename(args):
     arg_check(args, "rename", 2)

_______________________________________________
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 domain core-dumping about reset option, Xen patchbot-unstable <=