StarCluster - Mailing List Archive

Re: plugin shell help

From: Justin Riley <no email>
Date: Sat, 30 Oct 2010 18:45:46 -0400

  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
Received on Sat Oct 30 2010 - 18:45:49 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject