debuggers.hg

changeset 19947:797006dadc38

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jul 08 10:51:00 2009 +0100 (2009-07-08)
parents 01ae7dc043ba
children 5c40f649a6a4
files stubdom/stubdom-dm
line diff
     1.1 --- a/stubdom/stubdom-dm	Tue Jul 07 14:38:59 2009 +0100
     1.2 +++ b/stubdom/stubdom-dm	Wed Jul 08 10:51:00 2009 +0100
     1.3 @@ -82,8 +82,8 @@ term() {
     1.4      kill %1
     1.5      (
     1.6  	[ -n "$vncpid" ] && kill -9 $vncpid
     1.7 +	rm ${stubdom_configdir}/$domname-dm
     1.8  	xm destroy $domname-dm
     1.9 -        rm ${stubdom_configdir}/$domname-dm
    1.10      ) &
    1.11      # We need to exit immediately so as to let xend do the commands above
    1.12      exit 0