I already did that. ;)<div>Now I'm getting another error:</div><div><br></div><div><div>In [1]: cluster.run_plugin("shortreadplugin","myfirstcluster",cfg)</div><div>>>> Using private key /Users/dante/.ec2/bioc-keypair.pem.rsa (rsa)</div>
<div>---------------------------------------------------------------------------</div><div>AttributeError Traceback (most recent call last)</div><div><br></div><div>/Library/Python/2.6/site-packages/StarCluster-0.91-py2.6.egg/starcluster/cli.pyc in <module>()</div>
<div>----> 1 </div><div> 2 </div><div> 3 </div><div> 4 </div><div> 5 </div><div><br></div><div>/Library/Python/2.6/site-packages/StarCluster-0.91-py2.6.egg/starcluster/cluster.pyc in run_plugin(plugin_name, cluster_tag, cfg)</div>
<div> 175 plugins = {}</div><div> 176 plugins[plugin_name] = plug</div><div>--> 177 plugins = cl.load_plugins(plugins)</div><div> 178 master = cl.master_node</div><div> 179 for p in plugins:</div>
<div><br></div><div>/Library/Python/2.6/site-packages/StarCluster-0.91-py2.6.egg/starcluster/cluster.pyc in load_plugins(self, plugins)</div><div> 314 plugs = []</div><div> 315 for plugin in plugins:</div>
<div>--> 316 setup_class = plugin.get('setup_class')</div><div> 317 plugin_name = plugin.get('__name__')</div><div> 318 mod_name = '.'.join(setup_class.split('.')[:-1])</div>
<div><br></div><div>AttributeError: 'str' object has no attribute 'get'</div><div><br></div><div>Hmm....</div><div>Dan</div><div><br></div><br><div class="gmail_quote">On Sat, Oct 30, 2010 at 11:27 AM, Marc Resnick <span dir="ltr"><<a href="mailto:mresnick@mit.edu">mresnick@mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yes, that's the bug I told Justin about this Summer... I think I<br>
patched it, but he may have forgotten to pull from my fork.<br>
<br>
You can fix it by editing the run_plugin method, and replacing<br>
<div class="im"><br>
cl = get_cluster(cluster_tag)<br>
<br>
</div>with<br>
<br>
cl = get_cluster(cluster_tag, cfg)<br>
<font color="#888888"><br>
<br>
<br>
Marc<br>
</font><div><div></div><div class="h5"><br>
<br>
On Sat, Oct 30, 2010 at 2:20 PM, Dan Tenenbaum <<a href="mailto:dtenenba@fhcrc.org">dtenenba@fhcrc.org</a>> wrote:<br>
> Hi Marc,<br>
> I am running 0.91.<br>
> I was doing a couple things wrong. I figured them out but I am still having<br>
> this problem.<br>
> One thing I did wrong was have the<br>
> plugins=shortreadplugin<br>
> line under the global section; it needed to be under the<br>
> [cluster smallcluster]<br>
> section.<br>
> When I start the cluster now, I can see the output from my plugin:<br>
>>>> Running plugin shortreadplugin<br>
>>>> about to echo<br>
> But, when I run the shell and put in this command:<br>
> cluster.run_plugin("shortreadplugin","myfirstcluster",cfg)<br>
> I get the same error described below.<br>
> Dan<br>
><br>
> On Sat, Oct 30, 2010 at 11:11 AM, Marc Resnick <<a href="mailto:mresnick@mit.edu">mresnick@mit.edu</a>> wrote:<br>
>><br>
>> Hey Dan,<br>
>><br>
>> Are you running the latest version? I saw that bug a few months ago, I<br>
>> thought I remember Justin fixing it.<br>
>><br>
>><br>
>> Marc<br>
>><br>
>> On Sat, Oct 30, 2010 at 2:00 PM, Dan Tenenbaum <<a href="mailto:dtenenba@fhcrc.org">dtenenba@fhcrc.org</a>> wrote:<br>
>> > Hi,<br>
>> > I am not much of a python programmer and I'm trying to figure out the<br>
>> > plugin<br>
>> > system.<br>
>> > I created a ~/.starcluster/plugins directory and put a file in it called<br>
>> > shortread.py.<br>
>> > Here are its contents:<br>
>> ><br>
>> > from starcluster.clustersetup import ClusterSetup<br>
>> > from starcluster.logger import log<br>
>> > class ShortReadPlugin(ClusterSetup):<br>
>> > def __init__(self, arg1):<br>
>> > self.arg1 = arg1<br>
>> > <a href="http://log.info" target="_blank">log.info</a>('arg1 = %s' % arg1)<br>
>> > def run(self, nodes, master, user, user_shell, volumes):<br>
>> > <a href="http://log.info" target="_blank">log.info</a>("about to echo")<br>
>> > master.ssh.execute("echo 'hey'")<br>
>> > As you can see, it's just a test.<br>
>> > In my config, I put this at the bottom:<br>
>> > [plugin shortreadplugin]<br>
>> > SETUP_CLASS = ShortReadPlugin<br>
>> > arg1=foo<br>
>> > And above in the [global] section I put:<br>
>> > plugins=shortreadplugin<br>
>> > I'm a bit confused about whether this is right because in your example:<br>
>> > <a href="http://web.mit.edu/stardev/cluster/docs/plugins.html" target="_blank">http://web.mit.edu/stardev/cluster/docs/plugins.html</a><br>
>> > ...you have the SETUP_CLASS as ubuntu.PackageInstaller. I'm not sure<br>
>> > where<br>
>> > the "ubuntu" fits into this. Is it like java where I need to have a<br>
>> > folder<br>
>> > called ubuntu where the class resides?<br>
>> > Anyway, I fired up my cluster and went to test this with "starcluster<br>
>> > shell"<br>
>> > and got the following output:<br>
>> > In [5]: cluster.run_plugin('shortreadplugin', 'myfirstcluster', cfg)<br>
>> ><br>
>> > ---------------------------------------------------------------------------<br>
>> > TypeError Traceback (most recent call<br>
>> > last)<br>
>> ><br>
>> > /Library/Python/2.6/site-packages/StarCluster-0.91-py2.6.egg/starcluster/cli.pyc<br>
>> > in <module>()<br>
>> > ----> 1<br>
>> > 2<br>
>> > 3<br>
>> > 4<br>
>> > 5<br>
>> ><br>
>> > /Library/Python/2.6/site-packages/StarCluster-0.91-py2.6.egg/starcluster/cluster.pyc<br>
>> > in run_plugin(plugin_name, cluster_tag, cfg)<br>
>> > 170 def run_plugin(plugin_name, cluster_tag, cfg):<br>
>> > 171 ec2 = cfg.get_easy_ec2()<br>
>> > --> 172 cl = get_cluster(cluster_tag)<br>
>> > 173 cl.load_receipt()<br>
>> > 174 plug = cfg.get_plugin(plugin_name)<br>
>> > TypeError: get_cluster() takes exactly 2 arguments (1 given)<br>
>> ><br>
>> > It's hard for me to understand what's happening here. I of course am not<br>
>> > calling get_cluster directly. Is there a bug in run_plugin() or is there<br>
>> > something wrong in my setup, or both?<br>
>> > Thanks<br>
>> > Dan<br>
>> ><br>
>> > _______________________________________________<br>
>> > StarCluster mailing list<br>
>> > <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
>> > <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
>> ><br>
>> ><br>
>><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>