summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Hicks <mhicks@mhicks-host.usersys.redhat.com>2008-06-24 19:13:17 -0400
committerMatthew Hicks <mhicks@mhicks-host.usersys.redhat.com>2008-06-24 19:13:17 -0400
commitccfbf0ac9ebb7a78792cf8d8cb46ec8cdcbc4840 (patch)
treea2500bd25ae673abc56f5b7085dc394bfb9183dd
parent25d9425d07579896360dc8f02638fb026226077a (diff)
downloadtools-ccfbf0ac9ebb7a78792cf8d8cb46ec8cdcbc4840.tar.gz
tools-ccfbf0ac9ebb7a78792cf8d8cb46ec8cdcbc4840.tar.xz
tools-ccfbf0ac9ebb7a78792cf8d8cb46ec8cdcbc4840.zip
Adding the arch to func-find-resources
-rw-r--r--cloudmasterd/lib/cloudmasterd.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudmasterd/lib/cloudmasterd.rb b/cloudmasterd/lib/cloudmasterd.rb
index e8855e0..ca92e57 100644
--- a/cloudmasterd/lib/cloudmasterd.rb
+++ b/cloudmasterd/lib/cloudmasterd.rb
@@ -96,7 +96,7 @@ module Cloudmasterd::Models
end
end
def self.down
- drop_table :cloudmasterd_memory
+ drop_table :cloudmasterd_cloud
drop_table :cloudmasterd_machine
end
end
@@ -112,8 +112,8 @@ module Cloudmasterd::Controllers
end
# Find the best host on which to create a VM
- def _get_best_host(disk_size, ram)
- return `func-find-resources -m #{ram}`.chomp()
+ def _get_best_host(ram, arch)
+ return `func-find-resources -m #{ram} -a #{arch}`.chomp()
end
# run the appropriate koan command to create the given "fqdn"
@@ -136,10 +136,11 @@ module Cloudmasterd::Controllers
email = input.email
cobbler_profile = _get_cobbler_profile(machine_fqdn, repo)
+ cobbler_distro = cobblerd.distro(cobbler_profile["distro"])
# Synchronize access before making the func calls
Syncer::lock do
- @host = _get_best_host(cobbler_profile["virt_file_size"], cobbler_profile["virt_ram"])
+ @host = _get_best_host(cobbler_profile["virt_ram"], cobbler_distro["arch"])
begin
_koan(@host, machine_fqdn, repo)