Hi Stuart,<div><br></div><div>It's been a while since I've played with StarCluster, but try:</div><div><br></div><div>cl = get_cluster('testcluster',cfg)</div><div>cl.run_plugin(instance of plugin class)</div>
<div><br></div><div>Marc</div><div><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 6:22 PM, Stuart Young <span dir="ltr"><<a href="mailto:stuartpyoung@gmail.com" target="_blank">stuartpyoung@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#ffffff" text="#000000">
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium">
<pre>(Sorry - reposting with correct subject)
Hi All,
I'm having some trouble debugging my plugin inside the StarCluster
development shell.
I've created a plugin called automount.py like so:
class NfsShares (ClusterSetup):
"""
Automatically mounts external NFS shares on StarCluster nodes
"""
def __init__(self, head_ip):
<a href="http://log.info" target="_blank">log.info</a>("AutoMount.__init__ Running AutoMount plugin.")
...
.. and placed it in the ~/.starcluster/plugins directory and filled in
the config file as described in the documentation here:
<a href="http://web.mit.edu/stardev/cluster/docs/plugins.html" target="_blank">http://web.mit.edu/stardev/cluster/docs/plugins.html</a>
I started a cluster okay with:
starcluster start smallcluster
But when I come to test my plugin inside the development shell according
to the following instructions:
3. Launch the development shell and test your plugin on your small
test cluster
$ starcluster shell
[~]|1> cluster.run_plugin('myplugin', 'testcluster', cfg)
... I run this command inside the shell:
cluster.run_plugin('automount', 'smallcluster', cfg)
... and get this error message:
AttributeError: 'module' object has no attribute 'run_plugin'
So I tried the cluster.Cluster object since it has the 'run_plugin' method:
cluster.Cluster.run_plugin(cluster.Cluster, 'automount', 'smallcluster',
cfg)
... but I get this error message:
TypeError: unbound method run_plugin() must be called with Cluster
instance as first argument (got type instance instead)
Am I going about this the right way?
Cheers,
Stuart
</pre>
</span><br>
</div>
<br>_______________________________________________<br>
StarCluster mailing list<br>
<a href="mailto:StarCluster@mit.edu" target="_blank">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></blockquote></div><br></div>