From d6bccd3d16f7c6795071181bd8ad396bb264ced4 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 15 Nov 2008 10:30:59 -0500 Subject: [PATCH] Choose a host based on the maximum possible free memory, not the unallocated memory This works around the case where dom0's RAM doesn't get ballooned down svn path=/trunk/packages/invirt-remote-server/; revision=1650 --- debian/changelog | 7 +++++++ files/usr/sbin/invirt-remote-create | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1ae0af8..16d2a24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-remote-server (0.0.17) unstable; urgency=low + + * Get the host with the most RAM based on the maximum recoverable + memory, not the memory currently available to Xen + + -- Evan Broder Sat, 15 Nov 2008 10:30:10 -0500 + invirt-remote-server (0.0.16) unstable; urgency=low * When returning from a bcast, put together the stdout, not the stderr diff --git a/files/usr/sbin/invirt-remote-create b/files/usr/sbin/invirt-remote-create index db1b676..0a95d35 100755 --- a/files/usr/sbin/invirt-remote-create +++ b/files/usr/sbin/invirt-remote-create @@ -17,7 +17,7 @@ def choose_host(): # Query each of the hosts. # XXX will the output of 'xm info' always be parseable YAML? results = bcast('info') - return max((int(o['free_memory']), s) for (s, o) in results)[1] + return max((int(o['max_free_memory']), s) for (s, o) in results)[1] def main(argv): if len(argv) < 3: -- 1.7.9.5