Attached patch removes the empty domain if

xc.memory_increase_reservation fails.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-07-26 16:16:39 +00:00
1 parent 71ae53ce26
commit bd16e616b6
1 file changed
+7 -1
+7 -1
View File
@@ -130,7 +130,13 @@ class ImageHandler:
# xc.domain_setuuid(dom, uuid)
xc.domain_setcpuweight(dom, cpu_weight)
xc.domain_setmaxmem(dom, mem_kb)
xc.domain_memory_increase_reservation(dom, mem_kb)
try:
xc.domain_memory_increase_reservation(dom, mem_kb)
except:
xc.domain_destroy(dom)
raise
if cpu != -1:
xc.domain_pincpu(dom, 0, 1<<int(cpu))
return dom
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.