Our classad matching was using the realm from the provider classad even if the user didn't specify it; it was just matching against the first provider classad regardless of realm and using that.
This patch makes it so NULL is passed into the deltacloud gahp if no realm is specified by the user, allowing any realm to be chosen. Based on a patch from Ian Main. Signed-off-by: Chris Lalancette <[email protected]> --- src/app/util/condormatic.rb | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb index 4962c30..81f6bc7 100644 --- a/src/app/util/condormatic.rb +++ b/src/app/util/condormatic.rb @@ -37,8 +37,17 @@ def condormatic_instance_create(task) Rails.logger.info "universe = grid\n" pipe.puts "executable = #{job_name}\n" Rails.logger.info "executable = #{job_name}\n" - pipe.puts "grid_resource = dcloud $$(provider_url) $$(username) $$(password) $$(image_key) #{instance.name} $$(realm_key) $$(hardwareprofile_key) NULL\n" - Rails.logger.info "grid_resource = dcloud $$(provider_url) $$(username) $$(password) $$(image_key) #{instance.name} $$(realm_key) $$(hardwareprofile_key) NULL\n" + + resource = "grid_resource = dcloud $$(provider_url) $$(username) $$(password) $$(image_key) #{instance.name}" + if realm != nil + resource += " $$(realm_key)" + else + resource += " NULL" + end + resource += " $$(hardwareprofile_key)\n" + + pipe.puts resource + Rails.logger.info resource requirements = "requirements = hardwareprofile == \"#{instance.hardware_profile.id}\" && image == \"#{instance.image.id}\"" requirements += " && realm == \"#{realm.name}\"" if realm != nil -- 1.7.2.2 _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
