The way jobs are submitted to condor has changed with the latest
version. This patch formats the job appropriately for the new setup.
Signed-off-by: Ian Main <imain(a)redhat.com>
---
src/app/util/condormatic.rb | 27 ++++++++++++++++-----------
1 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb
index 8b4e224..9908d56 100644
--- a/src/app/util/condormatic.rb
+++ b/src/app/util/condormatic.rb
@@ -44,22 +44,27 @@ def condormatic_instance_create(task)
pipe.puts "executable = #{job_name}\n"
Rails.logger.info "executable = #{job_name}\n"
- resource = "grid_resource = dcloud $$(provider_url) $$(username) $$(password)
$$(image_key) #{escape(instance.name)}"
+ pipe.puts "grid_resource = deltacloud $$(provider_url)\n"
+ Rails.logger.info "grid_resource = deltacloud $$(provider_url)\n"
+ pipe.puts "DeltacloudUsername = $$(username)\n"
+ Rails.logger.info "DeltacloudUsername = $$(username)\n"
+ pipe.puts "DeltacloudPassword = $$(password)\n"
+ Rails.logger.info "DeltacloudPassword = $$(password)\n"
+ pipe.puts "DeltacloudImageId = $$(image_key)\n"
+ Rails.logger.info "DeltacloudImageId = $$(image_key)\n"
+ pipe.puts "DeltacloudHardwareProfile = $$(hardwareprofile_key)\n"
+ Rails.logger.info "DeltacloudHardwareProfile = $$(hardwareprofile_key)\n"
+ pipe.puts "DeltacloudKeyname = $$(keypair)\n"
+ Rails.logger.info "DeltacloudKeyname = $$(keypair)\n"
+
if realm != nil
- resource += " $$(realm_key)"
+ pipe.puts "DeltacloudRealmId = $$(realm_key)\n"
+ Rails.logger.info "DeltacloudRealmId = $$(realm_key)\n"
else
- resource += " NULL"
- end
- resource += " $$(hardwareprofile_key) $$(keypair) NULL\n"
-
- pipe.puts resource
- Rails.logger.info resource
requirements = "requirements = hardwareprofile ==
\"#{instance.hardware_profile.id}\" && image ==
\"#{instance.template.id}\""
requirements += " && realm == \"#{realm.id}\"" if realm
!= nil
- # We may need to add some stuff to the provider classads like pool id, provider id
etc. This is mostly just
- # to test and make sure this works for now.
- #
+
# This is currently broken as the condor plugin loads models without initializing
rails.
# However, recent changes have required that rails be initialized in order to load
the
# pool and quota models.
--
1.7.3.4