All of lore.kernel.org
 help / color / mirror / Atom feed
* xm dump-core options are useless
@ 2008-09-04 23:49 John Levon
  2008-09-05  2:09 ` Akio Takebe
  2008-09-05  7:36 ` Keir Fraser
  0 siblings, 2 replies; 6+ messages in thread
From: John Levon @ 2008-09-04 23:49 UTC (permalink / raw)
  To: xen-devel; +Cc: takebe_akio, hironaka.ken


This cset:

changeset:   11473:0008fca70351
date:        Thu Sep 14 08:19:38 2006 +0100
description:
xm dump command add on

xm dump-core [-L|--live][-C| --crash] <domID> [output path]

Didn't actually implement anything. Worse, it looks like we don't even
pause the domain, so it's always live (not good). What's going on?

regards
john

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xm dump-core options are useless
  2008-09-04 23:49 xm dump-core options are useless John Levon
@ 2008-09-05  2:09 ` Akio Takebe
  2008-09-05 13:23   ` John Levon
  2008-09-05  7:36 ` Keir Fraser
  1 sibling, 1 reply; 6+ messages in thread
From: Akio Takebe @ 2008-09-05  2:09 UTC (permalink / raw)
  To: John Levon; +Cc: xen-devel

Hi, John

John Levon wrote:
> This cset:
> 
> changeset:   11473:0008fca70351
> date:        Thu Sep 14 08:19:38 2006 +0100
> description:
> xm dump command add on
> 
> xm dump-core [-L|--live][-C| --crash] <domID> [output path]
> 
> Didn't actually implement anything. Worse, it looks like we don't even
> pause the domain, so it's always live (not good). What's going on?
> 
What do you mean? Why do you think "it looks like we don't even
pause the domain"? The following code of the patch looks like
we do pause domain by server.xend.domain.pause(dom).

+def xm_dump_core(args):
+    arg_check(args, "dump-core",1,3)
+    live = False
+    crash = False
+    import getopt
+    (options, params) = getopt.gnu_getopt(args, 'LC', ['live','crash'])
+
+    for (k, v) in options:
+        if k in ['-L', '--live']:
+            live = True
+        if k in ['-C', '--crash']:
+            crash = True
+
+    if len(params) == 0 or len(params) > 2:
+        err("invalid number of parameters")
+        usage("dump-core")
+
+    dom = params[0]
+    if len(params) == 2:
+        filename = os.path.abspath(params[1])
+    else:
+        filename = None
+
+    if not live:
+        server.xend.domain.pause(dom) <<< HERE
+
+    try:
+        print "dumping core of domain:%s ..." % str(dom)
+        server.xend.domain.dump(dom, filename, live, crash)
+    finally:
+        if not live:
+            server.xend.domain.unpause(dom)
+
+    if crash:
+        print "destroying domain:%s ..." % str(dom)
+        server.xend.domain.destroy(dom)
+

Best Regards,

Akio Takebe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xm dump-core options are useless
  2008-09-04 23:49 xm dump-core options are useless John Levon
  2008-09-05  2:09 ` Akio Takebe
@ 2008-09-05  7:36 ` Keir Fraser
  1 sibling, 0 replies; 6+ messages in thread
From: Keir Fraser @ 2008-09-05  7:36 UTC (permalink / raw)
  To: John Levon, xen-devel; +Cc: takebe_akio, hironaka.ken

On 5/9/08 00:49, "John Levon" <levon@movementarian.org> wrote:

> changeset:   11473:0008fca70351
> date:        Thu Sep 14 08:19:38 2006 +0100
> description:
> xm dump command add on
> 
> xm dump-core [-L|--live][-C| --crash] <domID> [output path]
> 
> Didn't actually implement anything. Worse, it looks like we don't even
> pause the domain, so it's always live (not good). What's going on?

I think you're looking at the wrong changeset, perhaps. It certainly has the
appearance of possessing the requisite moving parts.

 -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xm dump-core options are useless
  2008-09-05  2:09 ` Akio Takebe
@ 2008-09-05 13:23   ` John Levon
  2008-09-07 23:47     ` Masaki Kanno
  2008-09-08  1:40     ` Akio Takebe
  0 siblings, 2 replies; 6+ messages in thread
From: John Levon @ 2008-09-05 13:23 UTC (permalink / raw)
  To: Akio Takebe; +Cc: xen-devel

On Fri, Sep 05, 2008 at 11:09:39AM +0900, Akio Takebe wrote:

> >xm dump-core [-L|--live][-C| --crash] <domID> [output path]
> >
> >Didn't actually implement anything. Worse, it looks like we don't even
> >pause the domain, so it's always live (not good). What's going on?
> >
> What do you mean? Why do you think "it looks like we don't even
> pause the domain"? The following code of the patch looks like
> we do pause domain by server.xend.domain.pause(dom).

You are doing this stuff in xm which I missed due to the pointless
passing in of 'live' and 'crash' in the xend API.

This should be happening in the server not in the client if you're going
to pass the options in. In particular libvirt, but anything else that
isn't 'xm', is forced to do live dumps - not good.

I'll send a patch out shortly that implements them in the proper place.

> +    if not live:
> +        server.xend.domain.pause(dom) <<< HERE
> +
> +    try:
> +        print "dumping core of domain:%s ..." % str(dom)
> +        server.xend.domain.dump(dom, filename, live, crash)
> +    finally:
> +        if not live:
> +            server.xend.domain.unpause(dom)

BTW this is buggy if the domain was already paused.

regards
john

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xm dump-core options are useless
  2008-09-05 13:23   ` John Levon
@ 2008-09-07 23:47     ` Masaki Kanno
  2008-09-08  1:40     ` Akio Takebe
  1 sibling, 0 replies; 6+ messages in thread
From: Masaki Kanno @ 2008-09-07 23:47 UTC (permalink / raw)
  To: John Levon; +Cc: xen-devel, Akio Takebe

>> +    if not live:
>> +        server.xend.domain.pause(dom) <<< HERE
>> +
>> +    try:
>> +        print "dumping core of domain:%s ..." % str(dom)
>> +        server.xend.domain.dump(dom, filename, live, crash)
>> +    finally:
>> +        if not live:
>> +            server.xend.domain.unpause(dom)
>
>BTW this is buggy if the domain was already paused.

Hi John,

It was fixed by changeset 15888.

Best regards,
 Kan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xm dump-core options are useless
  2008-09-05 13:23   ` John Levon
  2008-09-07 23:47     ` Masaki Kanno
@ 2008-09-08  1:40     ` Akio Takebe
  1 sibling, 0 replies; 6+ messages in thread
From: Akio Takebe @ 2008-09-08  1:40 UTC (permalink / raw)
  To: John Levon; +Cc: xen-devel

John Levon wrote:
> On Fri, Sep 05, 2008 at 11:09:39AM +0900, Akio Takebe wrote:
> 
>>> xm dump-core [-L|--live][-C| --crash] <domID> [output path]
>>>
>>> Didn't actually implement anything. Worse, it looks like we don't even
>>> pause the domain, so it's always live (not good). What's going on?
>>>
>> What do you mean? Why do you think "it looks like we don't even
>> pause the domain"? The following code of the patch looks like
>> we do pause domain by server.xend.domain.pause(dom).
> 
> You are doing this stuff in xm which I missed due to the pointless
> passing in of 'live' and 'crash' in the xend API.
> 
> This should be happening in the server not in the client if you're going
> to pass the options in. In particular libvirt, but anything else that
> isn't 'xm', is forced to do live dumps - not good.
> 
> I'll send a patch out shortly that implements them in the proper place.
> 
Yes, I agree with you. I also think it is not good.

We implemented it before for improving xend downtime at dump-core.
http://lists.xensource.com/archives/html/xen-devel/2007-09/msg00576.html

Best Regards,

Akio Takebe

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-08  1:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-04 23:49 xm dump-core options are useless John Levon
2008-09-05  2:09 ` Akio Takebe
2008-09-05 13:23   ` John Levon
2008-09-07 23:47     ` Masaki Kanno
2008-09-08  1:40     ` Akio Takebe
2008-09-05  7:36 ` Keir Fraser

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.