All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix domain core-dumping about reset option
@ 2009-03-13  2:16 Masaki Kanno
  0 siblings, 0 replies; only message in thread
From: Masaki Kanno @ 2009-03-13  2:16 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 230 bytes --]

Hi,

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@jp.fujitsu.com>

Best regards,
 Kan


[-- Attachment #2: fix_dumpcore.patch --]
[-- Type: application/octet-stream, Size: 2602 bytes --]

diff -r c30742011bb8 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py	Thu Mar 12 18:48:09 2009 +0000
+++ b/tools/python/xen/xend/XendDomain.py	Fri Mar 13 09:00:28 2009 +0900
@@ -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 c30742011bb8 tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py	Thu Mar 12 18:48:09 2009 +0000
+++ b/tools/python/xen/xend/server/SrvDomain.py	Fri Mar 13 09:00:28 2009 +0900
@@ -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 c30742011bb8 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py	Thu Mar 12 18:48:09 2009 +0000
+++ b/tools/python/xen/xm/main.py	Fri Mar 13 09:00:28 2009 +0900
@@ -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)

[-- 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] only message in thread

only message in thread, other threads:[~2009-03-13  2:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-13  2:16 [PATCH] Fix domain core-dumping about reset option Masaki Kanno

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.