aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-07-08 10:51:00 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-07-08 10:51:00 +0100
commitf96f790bc4438a9b174f31972fa16fbc78b5e03c (patch)
tree5c00962cdb3acee7ae0b3f9157dbf4183baf172e /stubdom
parentc6b8bdfe3b47fe94999f5f85b518da09dd5aed9a (diff)
downloadxen-f96f790bc4438a9b174f31972fa16fbc78b5e03c.tar.gz
xen-f96f790bc4438a9b174f31972fa16fbc78b5e03c.tar.bz2
xen-f96f790bc4438a9b174f31972fa16fbc78b5e03c.zip
stubdom: fix a race that affects live migration with stubdoms
This patch fixes a race during live migration with stubdoms: right after the stubdom dies the configuration file of the VM is removed by stubdom-dm but, in case of a live migration, the configuration file could be the one of the new VM in the process of being created. Removing the config file before destroying the stubdom is enough to solve the race. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'stubdom')
-rw-r--r--stubdom/stubdom-dm2
1 files changed, 1 insertions, 1 deletions
diff --git a/stubdom/stubdom-dm b/stubdom/stubdom-dm
index 76068a0bd0..06b29e5b3f 100644
--- a/stubdom/stubdom-dm
+++ b/stubdom/stubdom-dm
@@ -82,8 +82,8 @@ term() {
kill %1
(
[ -n "$vncpid" ] && kill -9 $vncpid
+ rm ${stubdom_configdir}/$domname-dm
xm destroy $domname-dm
- rm ${stubdom_configdir}/$domname-dm
) &
# We need to exit immediately so as to let xend do the commands above
exit 0