This archive was generated by
OK, I figured out that the plugin needs to be in a file called
"something.py" and then you can refer to it in the config as
I re-launched my cluster and I am not seeing output from my plugin in either
the console or log.
Also, still getting the same error (below) in the development shell.
On Sat, Oct 30, 2010 at 11:00 AM, Dan Tenenbaum <dtenenba_at_fhcrc.org> wrote:
> I am not much of a python programmer and I'm trying to figure out the
> plugin system.
> I created a ~/.starcluster/plugins directory and put a file in it called
> Here are its contents:
> from starcluster.clustersetup import ClusterSetup
> from starcluster.logger import log
> class ShortReadPlugin(ClusterSetup):
> def __init__(self, arg1):
> self.arg1 = arg1
> log.info('arg1 = %s' % arg1)
> def run(self, nodes, master, user, user_shell, volumes):
> log.info("about to echo")
> master.ssh.execute("echo 'hey'")
> As you can see, it's just a test.
> In my config, I put this at the bottom:
> [plugin shortreadplugin]
> SETUP_CLASS = ShortReadPlugin
> And above in the [global] section I put:
> I'm a bit confused about whether this is right because in your example:
> ...you have the SETUP_CLASS as ubuntu.PackageInstaller. I'm not sure where
> the "ubuntu" fits into this. Is it like java where I need to have a folder
> called ubuntu where the class resides?
> Anyway, I fired up my cluster and went to test this with "starcluster
> shell" and got the following output:
> In : cluster.run_plugin('shortreadplugin', 'myfirstcluster', cfg)
> TypeError Traceback (most recent call last)
> in <module>()
> ----> 1
> in run_plugin(plugin_name, cluster_tag, cfg)
> 170 def run_plugin(plugin_name, cluster_tag, cfg):
> 171 ec2 = cfg.get_easy_ec2()
> --> 172 cl = get_cluster(cluster_tag)
> 173 cl.load_receipt()
> 174 plug = cfg.get_plugin(plugin_name)
> TypeError: get_cluster() takes exactly 2 arguments (1 given)
> It's hard for me to understand what's happening here. I of course am not
> calling get_cluster directly. Is there a bug in run_plugin() or is there
> something wrong in my setup, or both?
> StarCluster mailing list
Received on Sat Oct 30 2010 - 14:10:04 EDT