Skip to contentSkip to conversation

Fix reversed test in balloon.py

PATCH New Charles Coffing 1 participant 1 message Mar 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix reversed test in balloon.py

When dom0 fails to balloon enough memory to allow a new domain to start, an exception is thrown. The test that decides which exception to throw is backwards, resulting in strange error messages. The attached patch fixes the problem.

tools/python/xen/xend/balloon.py +1 -1
@@ -152,7 +152,7 @@
                            'I cannot release any more.  I need %d MiB but '
                            'only have %d.') %
                           (need_mem, free_mem))
-        elif new_alloc >= dom0_min_mem:
+        elif new_alloc < dom0_min_mem:
             raise VmError(
                 ('I need %d MiB, but dom0_min_mem is %d and shrinking to '
                  '%d MiB would leave only %d MiB free.') %

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel