On Wed, Jan 26, 2011 at 02:45:46PM +0100, Jan Provaznik wrote:
On 01/24/2011 11:11 PM, Ian Main wrote:
>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..dc760f0 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
ACK, I'm able to start instance now.
Thanks!
Ian