-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Following up, the latest github code (master branch) adds the following
NEW action hooks for plugins:
on_add_node(node, nodes, master, user, shell, vols)
- - Called after a node has been added to the cluster. First paramter is
the newly added node, rest of the parameters are the same as with run()
on_remove_node(node, nodes, master, user, shell, vols)
- - Called before a node is to be removed from the cluster. First
parameter is the node to be removed, rest of the parameters are the same
as with run()
on_restart(nodes, master, user, shell, vols)
- - Called before entire cluster is to be rebooted. Same parameters as in
with run()
on_shutdown(nodes, master, user, shell, vols)
- - Called before entire cluster is to be shutdown. Same parameters as in
with run()
I've already implemented add/remove in the default plugin and ipcluster
plugin if you want to see how to use them:
https://github.com/jtriley/StarCluster/blob/master/starcluster/plugins/ipcluster.py
https://github.com/jtriley/StarCluster/blob/master/starcluster/clustersetup.py
~Justin
On 10/20/2010 09:22 AM, Dan Yamins wrote:
> 
> 
> On Wed, Oct 20, 2010 at 9:05 AM, Austin Godber <godber_at_uberhip.com
> <mailto:godber_at_uberhip.com>> wrote:
> 
>     Hi Dan,
>         Yeah,  I have been playing with them a little bit which is what
>     brought up the idea.  The plugins are exactly as you said a post
>     startup hook.  If I had a pre-shutdown hook I could save state about
>     the cluster prior to shutting it down.  I guess there may not be
>     that many actions that need hooking, but I just thought I would
>     throw the idea out there so people could give it a think.
> 
> 
> Yes  I agree, I defeinitely would like a pre-shutdown hook as well.    I
> think having a bunch of action hooks, which could be expressed as
> methods to the ClusterSetup object just like "run" is now the
> post-startup hook, would be good in general.   
> 
> Justin and I and some others here in Cambridge once discussed also
> having a _pre-start_ hook, as distinguished from a post-start hook, to
> handle advanced logic in the configuration of the node start commands,
> like complex cluster structures.   Some of my original desire fore that
> is alleviated by having a compound node_instance_type to these cluster
> structures, but it still might be useful.  
> 
> Also, now that there's also add_node and delete_node commands for
> dynamic load balancing (I think these are going to be in the next
> release) having action hooks for those actions would be useful as well.
>  (I'm not sure how Justin is thinking of handling it.) 
> 
> Dan
> 
>  
> 
> 
>         For the most part, I am doing slightly goofy things with
>     StarCluster and I don't want to annoy you guys (and Justin) too
>     much.  But when I think of something that is generally useful I
>     thought I would share.  Like the _setup_sge() thing.  I know thats
>     the /main point/ of StarCluster, but its also the only line in
>     DefaultClusterSetup that makes StarCluster a SGE Cluster creator for
>     EC2 rather than a generic cluster creator for EC2.
> 
>     Austin
> 
> 
>     On 10/20/2010 08:53 AM, Dan Yamins wrote:
>>     Austin -- are you aware of starcluster plugins?   
>>
>>     http://web.mit.edu/stardev/cluster/docs/plugins.html
>>
>>     These are essentially (as far as I understand it) action hooks for
>>     startup.  
>>
>>     Dan
>>
>>     On Tue, Oct 19, 2010 at 9:06 PM, Austin Godber <godber_at_uberhip.com
>>     <mailto:godber_at_uberhip.com>> wrote:
>>
>>         I don't think there are any action hooks of any sort for
>>         starcluster are
>>         there?  For instance if I wanted to do something before or
>>         after cluster
>>         start or shutdown?  That could be a handy feature.
>>
>>         Austin
>>         _______________________________________________
>>         StarCluster mailing list
>>         StarCluster_at_mit.edu <mailto:StarCluster_at_mit.edu>
>>         http://mailman.mit.edu/mailman/listinfo/starcluster
>>
>>
>>
>>     _______________________________________________
>>     StarCluster mailing list
>>     StarCluster_at_mit.edu <mailto:StarCluster_at_mit.edu>
>>     http://mailman.mit.edu/mailman/listinfo/starcluster
> 
> 
>     _______________________________________________
>     StarCluster mailing list
>     StarCluster_at_mit.edu <mailto:StarCluster_at_mit.edu>
>     http://mailman.mit.edu/mailman/listinfo/starcluster
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - 
http://enigmail.mozdev.org/
iEYEARECAAYFAkzYNdQACgkQ4llAkMfDcrmoFwCfUHX5pcQ9xBsG3l9nhnkOwue8
NfIAn17zh+g8sJ5oUEKNTBrHavyLWEao
=h11D
-----END PGP SIGNATURE-----
Received on Mon Nov 08 2010 - 12:39:36 EST