<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi All,<br>
<br>
I'm having some trouble debugging my plugin inside the StarCluster
development shell. <br>
<br>
I've created a plugin called automount.py like so:<br>
<br>
<blockquote>class NfsShares (ClusterSetup):<br>
"""<br>
Automatically mounts external NFS shares on StarCluster nodes<br>
"""<br>
def __init__(self, head_ip):<br>
log.info("AutoMount.__init__ Running AutoMount
plugin.")<br>
...<br>
</blockquote>
.. and placed it in the ~/.starcluster/plugins directory and filled
in the config file as described in the documentation here:<br>
<a href="http://web.mit.edu/stardev/cluster/docs/plugins.html">http://web.mit.edu/stardev/cluster/docs/plugins.html</a><br>
<br>
I started a cluster okay with: <br>
<br>
starcluster start smallcluster<br>
<br>
But when I come to test my plugin inside the development shell
according to the following instructions:<br>
<span class="Apple-style-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; orphans: 2; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; font-size: medium;"><span
class="Apple-style-span" style="font-family: 'Lucida
Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;
font-size: 14px; line-height: 21px; text-align: left;">
<ol class="arabic simple" start="3">
<li>Launch the development shell and test your plugin on your
small test cluster</li>
</ol>
<div class="highlight-none">
<div class="highlight" style="background-color: rgb(251, 229,
78);">
<pre style="font-family: Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; font-size: 0.95em; letter-spacing: 0.015em; padding: 0.5em; border: 1px solid rgb(204, 204, 204); background-color: rgb(248, 248, 248); line-height: 15px;">$ starcluster shell
[~]|1> cluster.run_plugin('myplugin', 'testcluster', cfg)</pre>
</div>
</div>
</span></span>... I run this command inside the shell:<br>
<br>
cluster.run_plugin('automount', 'smallcluster', cfg)<br>
<br>
... and get this error message:<br>
<br>
AttributeError: 'module' object has no attribute 'run_plugin'<br>
<br>
So I tried the cluster.Cluster object since it has the 'run_plugin'
method:<br>
<br>
cluster.Cluster.run_plugin(cluster.Cluster, 'automount',
'smallcluster', cfg)<br>
<br>
... but I get this error message:<br>
<br>
TypeError: unbound method run_plugin() must be called with
Cluster instance as first argument (got type instance instead)<br>
<br>
Am I going about this the right way?<br>
<br>
Cheers,<br>
<br>
Stuart<br>
<br>
<br>
<br>
<br>
</body>
</html>