Skip to contentSkip to conversation

fix a race that affects live migration with stubdoms

PATCH New Stefano Stabellini 1 participant 1 message Jul 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix a race that affects live migration with stubdoms

Hi all,
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.

Please backport this patch to 3.4 testing too.

---

stubdom/stubdom-dm +1 -1
diff -r 92ee18aac1b6 stubdom/stubdom-dm
@@ -71,8 +71,8 @@
     kill %1
     (
 	[ -n "$vncpid" ] && kill -9 $vncpid
+        rm /etc/xen/stubdoms/$domname-dm
 	xm destroy $domname-dm
-        rm /etc/xen/stubdoms/$domname-dm
     ) &
     # We need to exit immediately so as to let xend do the commands above
     exit 0