All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Cleanup empy domain if memory reservation fails
@ 2005-07-26 15:52 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2005-07-26 15:52 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

Attached patch removes the empty domain if 
xc.memory_increase_reservation fails.

Regards,

Anthony Liguori

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

[-- Attachment #2: bug113.diff --]
[-- Type: text/x-patch, Size: 636 bytes --]

diff -r 70c3ba5276c0 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py	Tue Jul 26 13:57:56 2005
+++ b/tools/python/xen/xend/image.py	Tue Jul 26 10:50:47 2005
@@ -130,7 +130,13 @@
         # 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

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-26 15:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26 15:52 [PATCH] Cleanup empy domain if memory reservation fails Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.