diff options
| -rw-r--r-- | cloudmasterd/lib/cloudmasterd.rb | 9 |
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) |
