[Saga-devel] saga SVN commit 3236: /trunk/saga/impl/engine/

Andre Merzky andre at merzky.net
Sat Jan 3 06:01:11 CST 2009


Quoting [Ole Christian Weidner] (Jan 03 2009):
> 
> Hi Andre,
> 
> can you elaborate on this? What does 'adaptor_suite wide settings' mean?

sure - although the answer is probably longer than you have
wished :-P

For the aws adaptor suite, I have some setting which I need
for all adaptors (context, file, job).  I could repeat these
settings in all ini files, but that seems cumbersome
(settings really need to be changed by the end user,
depending on what cloud backend the user is using).

So, instead of replicating these sections, I would like to
have a sections like saga.adaptor_suite.aws.references.
Easy to add, but how does the engine know that this section
needs to be used?

For that, we added a keyword to the default adaptor
preferences a while ago, so that looks like this:

  [saga.adaptors.aws_context]
    name        = aws_context
    preferences = saga.adaptor_suite.aws.preferences

  [saga.adaptors.aws_job]
    name        = aws_job
    preferences = saga.adaptor_suite.aws.preferences

  [saga.adaptors.aws_file]
    name        = aws_file
    preferences = saga.adaptor_suite.aws.preferences

  [saga.adaptor_suite.aws.preferences]
    cloud_names        = ec2 eucalyptus nimbus
    java_home          = /usr/
    ec2_home           = $[saga.location]/bin/aws-tools/
    ec2_scripts        = $[saga.location]/bin/aws-tools/
    ec2_keystore       = ${HOME}/.ec2_keys/
    ec2_keepalive      = true

So, voila, all adaptors can use the same preferences.

Now, as said, that was implemented a while ago.  The mistake
I made back then is that it was now impossible to add
adaptor specific prefs, like

  [saga.adaptors.aws_job]
    name          = aws_job
    preferences   = saga.adaptor_suite.aws.preferences
    ec2_keepalive = false # overwrite global setting

That is what the commit you saw fixed: first, the
preferences pointed to by the 'preferences' keyword are
evaluated, then the normal preferences evaluation continues,
and allows to add/change these suite wide preferences.

Cheers, Andre.


PS.:

Yes, I know, I could have done virtually the same with:

  [saga.adaptor_suite.aws.preferences]
    cloud_names        = ec2 eucalyptus nimbus
    java_home          = /usr/
    ec2_home           = $[saga.location]/bin/aws-tools/
    ec2_scripts        = $[saga.location]/bin/aws-tools/
    ec2_keystore       = ${HOME}/.ec2_keys/
    ec2_keepalive      = true

  [saga.adaptors.aws_job]
    name               = aws_job
    cloud_names        = $[saga.adaptor-suite.aws.preferences.cloud_names]
    java_home          = $[saga.adaptor-suite.aws.preferences.java_home]
    ec2_home           = $[saga.adaptor-suite.aws.preferences.ec2_home]
    ec2_scripts        = $[saga.adaptor-suite.aws.preferences.ec2_scripts]
    ec2_keystore       = $[saga.adaptor-suite.aws.preferences.ec2_keystore]
    ec2_keepalive      = false

Did not think of that 'til later... :-P


> Cheers & Happy 2009 ;-)
> 
> - Ole
> 
> On Dec 30, 2008, at 11:03 AM, amerzky at cct.lsu.edu wrote:
> 
> >User: amerzky
> >Date: 2008/12/30 11:03 AM
> >
> >Modified:
> >/trunk/saga/impl/engine/
> >engine.cpp
> >
> >Log:
> >fixing adaptor preference evaluation: It is now possible to
> >merge more specific adaptor settings with adaptor_suite wide
> >settings.  Change is backward compatible.
> >A
> 



-- 
Nothing is ever easy.


More information about the saga-devel mailing list