[StarCluster] plugin shell help

Justin Riley jtriley at MIT.EDU
Sat Oct 30 18:45:46 EDT 2010


  On 10/30/10 5:44 PM, Dan Tenenbaum wrote:
> OK,
>
> Farther along.
> I made an additional patch to cluster.py, in load_plugins():
>
> old code:
>        for plugin in plugins:
>
> new code:
>         for key in plugins:
>             plugin = plugins[key]
>
> That gets me past that trouble spot.
>
> Then, though, when I try and run my plugin from the shell, I get this:

You can also use the following approach to run your plugin:

$ starcluster shell
$ from shortread import ShortReadPlugin
$ plugin = ShortReadPlugin(your, args, here)
$ cl = cluster.get_cluster("mycluster", cfg)
$ cl.load_receipt()
$ plugin.run(cl.nodes, cl.master_node, cl.cluster_user, 
cl.cluster_shell, cl.volumes)

Alternatively this patch to run_plugin in cluster.py should work:

def run_plugin(plugin_name, cluster_tag, cfg):
ec2 = cfg.get_easy_ec2()
cl = get_cluster(cluster_tag, cfg)
cl.load_receipt()
plug = cfg.get_plugin(plugin_name)
plugins = {}
plugins[plugin_name] = plug
plugins = cl.load_plugins(plugins)
master = cl.master_node
for p in plugins:
plugins.get(p).run(cl.nodes, cl.master_node, cl.cluster_user, 
cl.cluster_shell, cl.volumes)



~Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/starcluster/attachments/20101030/90e548ff/attachment.htm


More information about the StarCluster mailing list