Fix xm dump-core for clustering systems
PATCH 1/1 Fix xm dump-core for clustering systems
Hi,
When a hang-up of a guest OS in a clustering system is occurred, I'd like to do fail-over to another in the clustering system, and collect a core dump of the guest OS by xm dump-core command with crash option. Then I'd like to destroy the guest domain after collecting the core dump of the guest OS.
However, a processing of xm dump-core command destroys the guest domain after unpausing the guest domain. For the unpause, the guest OS might access disks after fail-over.
I'd like to remove the possibility by this patch. The patch gives higher priority to domain destructions by crash option than domain unpauses.
Best regards,
Kan
tools/python/xen/xm/main.py +5 -5
@@ -1294,13 +1294,13 @@ def xm_dump_core(args): try: print "Dumping core of domain: %s ..." % str(dom) server.xend.domain.dump(dom, filename, live, crash) + + if crash: + print "Destroying domain: %s ..." % str(dom) + server.xend.domain.destroy(dom) finally: - if not live and ds == DOM_STATE_RUNNING: + if not live and not crash and ds == DOM_STATE_RUNNING: server.xend.domain.unpause(dom) - - if crash: - print "Destroying domain: %s ..." % str(dom) - server.xend.domain.destroy(dom) def xm_rename(args): arg_check(args, "rename", 2)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel