[ 
https://issues.apache.org/jira/browse/CASSANDRA-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076093#comment-13076093
 ] 

Michael Allen commented on CASSANDRA-2523:
------------------------------------------

Stu was headed in the right direction here.  I've attached a working revised 
version of his patch with a few adjustments.  

The main difference is the use of whirr's StatementBuilder, which uses jclouds 
ScripBuilder.  When an instance of ScriptBuilder is rendered and during the 
'resolve function dependencies stage', jclouds will search the class path for a 
directory named "functions".  It will then look in that directory for a file 
named after the function that it is trying to resolve.  For example, if in the 
ScriptBuilder there was a call to the function "start_cassandra", then jclouds 
would look for a file named functions/start_cassandra.sh and if found, include 
its content in the ScriptBuilder.  

functions/start_cassandra.sh is expected to contain a single function 
definition, namely "start_cassandra".

This seems to work fairly well in practice, and we no longer use runurl with 
this solution.



> Distributed test scripts not working with Whirr 0.4.0
> -----------------------------------------------------
>
>                 Key: CASSANDRA-2523
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2523
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Stu Hood
>            Assignee: Michael Allen
>             Fix For: 0.8.3
>
>         Attachments: 
> 0001-WIP-Update-to-use-jclouds-magical-functions-directory-.txt, 
> 2523-1-use-jclouds-magical-functions-directory-revised.txt
>
>
> I suspect that our runurl based script execution is not working with Whirr 
> 0.4.0, which is causing distributed tests that kill/wipe nodes to timeout. 
> See [this FAQ 
> entry|http://incubator.apache.org/whirr/faq.html#how-can-i-modify-the-instance-installation-and-configuration-scripts]
>  for a description of the change.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to