On 02/01/2011 10:16 PM, jprovazn(a)redhat.com wrote:
From: Ian Main<imain(a)redhat.com>
This is a TEMPORARY hack to get around the need to initialize rails in
the models. The addition of search has made this plugin fail because
the pool and quota models now require rails to be initialized in order
to load.
The right way to fix this is to create a REST API allowing us to call
into the conductor for our quota check.
Signed-off-by: Ian Main<imain(a)redhat.com>
---
src/app/util/condormatic.rb | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb
index 79021ba..8b4e224 100644
--- a/src/app/util/condormatic.rb
+++ b/src/app/util/condormatic.rb
@@ -59,7 +59,11 @@ def condormatic_instance_create(task)
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.
- requirements += "&& deltacloud_quota_check(\"#{job_name}\",
other.cloud_account_id)"
+ #
+ # 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.
+ #requirements += "&& deltacloud_quota_check(\"#{job_name}\",
other.cloud_account_id)"
requirements += "\n"
pipe.puts requirements
Ouch, ignore this patchset (was in a wrong branch when generating patch)