All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix domain core-dumping about reset option
Date: Fri, 13 Mar 2009 11:16:26 +0900	[thread overview]
Message-ID: <9FC9A381B6A5A5kanno.masaki@jp.fujitsu.com> (raw)

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

                 reply	other threads:[~2009-03-13  2:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9FC9A381B6A5A5kanno.masaki@jp.fujitsu.com \
    --to=kanno.masaki@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.