|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 4 of 9] libxl: should consider shutdown_reason for dy
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1280140563 -3600
# Node ID 982bf44850029802b7395a03659bf440d191be2f
# Parent 1e0b63948031587b958ea307410d19c7b2be9614
libxl: should consider shutdown_reason for dying as well as shutdown domains.
A dying domain is one which has notified the hypervisor (with
SCHEDOP_shutdown) and provided a reason code but which hasn't actually
shutdown yet.
Therefore a domain which is dying will always have a valid
shutdown_reason and therefore we should obey it.
Failure to do so means there is a race between domain cleanup in the
hypervisor and the toolstack notification which can mean we may
destroy a domain which actually wanted to be rebooted.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r 1e0b63948031 -r 982bf4485002 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c Mon Jul 26 11:36:02 2010 +0100
+++ b/tools/libxl/libxl.c Mon Jul 26 11:36:03 2010 +0100
@@ -416,7 +416,7 @@ static void xcinfo2xlinfo(const xc_domai
xlinfo->crashed = 0;
xlinfo->shutdown_reason = -1;
- if (xlinfo->shutdown) {
+ if (xlinfo->dying || xlinfo->shutdown) {
switch ((xcinfo->flags>>XEN_DOMINF_shutdownshift) &
XEN_DOMINF_shutdownmask) {
case SHUTDOWN_poweroff:
xlinfo->shutdown_reason = LIBXL_SHUTDOWN_POWEROFF;
@@ -429,7 +429,7 @@ static void xcinfo2xlinfo(const xc_domai
break;
case SHUTDOWN_crash:
xlinfo->shutdown_reason = LIBXL_SHUTDOWN_CRASH;
- xlinfo->shutdown = 0;
+ xlinfo->shutdown = xlinfo->dying = 0;
xlinfo->crashed = 1;
break;
case SHUTDOWN_watchdog:
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-devel] [PATCH 2 of 9] libxl: return libxl_dominfo from libxl_event_get_domain_death_info, (continued)
[Xen-devel] [PATCH 3 of 9] libxl: signal caller if domain already destroyed on domain death event, Ian Campbell
[Xen-devel] [PATCH 4 of 9] libxl: should consider shutdown_reason for dying as well as shutdown domains,
Ian Campbell <=
[Xen-devel] [PATCH 5 of 9] libxl: add libxl_domain_preserve, Ian Campbell
[Xen-devel] [PATCH 6 of 9] xl: do not try and auto re-connect console on reboot, Ian Campbell
[Xen-devel] [PATCH 7 of 9] xl: Add function to generate random uuid and use it, Ian Campbell
[Xen-devel] [PATCH 8 of 9] xl: Factor out domain death handling into a separate function, Ian Campbell
[Xen-devel] [PATCH 9 of 9] xl: support on_{poweroff, reboot, crash} domain configuration options, Ian Campbell
[Xen-devel] [PATCH 0 of 9] xl: handle domain shutdown/reboot/crash in a user configurable way, Ian Campbell
|
|
|
|
|