ia64/xen-unstable

changeset 17384:0834234fd668

xm: When dumping core of an errant domain do not unpause after the
dump. This could allow the domain to e.g., access disks after
fail-over.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Apr 04 10:18:45 2008 +0100 (2008-04-04)
parents da35b52c4fd7
children 57febe0264e1
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Thu Apr 03 11:37:23 2008 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Fri Apr 04 10:18:45 2008 +0100
     1.3 @@ -1294,14 +1294,14 @@ def xm_dump_core(args):
     1.4      try:
     1.5          print "Dumping core of domain: %s ..." % str(dom)
     1.6          server.xend.domain.dump(dom, filename, live, crash)
     1.7 +
     1.8 +        if crash:
     1.9 +            print "Destroying domain: %s ..." % str(dom)
    1.10 +            server.xend.domain.destroy(dom)
    1.11      finally:
    1.12 -        if not live and ds == DOM_STATE_RUNNING:
    1.13 +        if not live and not crash and ds == DOM_STATE_RUNNING:
    1.14              server.xend.domain.unpause(dom)
    1.15  
    1.16 -    if crash:
    1.17 -        print "Destroying domain: %s ..." % str(dom)
    1.18 -        server.xend.domain.destroy(dom)
    1.19 -
    1.20  def xm_rename(args):
    1.21      arg_check(args, "rename", 2)
    1.22