summaryrefslogtreecommitdiffstats
path: root/cloudmasterd/lib
diff options
context:
space:
mode:
Diffstat (limited to 'cloudmasterd/lib')
-rw-r--r--cloudmasterd/lib/cloudmasterd.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/cloudmasterd/lib/cloudmasterd.rb b/cloudmasterd/lib/cloudmasterd.rb
index ca92e57..64bd514 100644
--- a/cloudmasterd/lib/cloudmasterd.rb
+++ b/cloudmasterd/lib/cloudmasterd.rb
@@ -111,6 +111,12 @@ module Cloudmasterd::Controllers
return cobblerd.profile(cobbler_system["profile"])
end
+ # Retrieve the cobbler distro for the given profile name
+ def _get_cobbler_distro(profile_name, repo)
+ cobblerd = Cloudmasterd::Helpers::Cobblerd.new(repo)
+ return cobblerd.distro(profile_name)
+ end
+
# Find the best host on which to create a VM
def _get_best_host(ram, arch)
return `func-find-resources -m #{ram} -a #{arch}`.chomp()
@@ -121,7 +127,7 @@ module Cloudmasterd::Controllers
def _koan(host, fqdn, repo)
# Run the koan process
output = `func "#{host}" call virt install #{repo} #{fqdn} True #{fqdn} /images`
-
+
# Throw an exception if the process failed
raise output unless $?.success?
@@ -136,7 +142,7 @@ module Cloudmasterd::Controllers
email = input.email
cobbler_profile = _get_cobbler_profile(machine_fqdn, repo)
- cobbler_distro = cobblerd.distro(cobbler_profile["distro"])
+ cobbler_distro = _get_cobbler_distro(cobbler_profile["distro"], repo)
# Synchronize access before making the func calls
Syncer::lock do