Hi All, <div><br></div><div>I wrote a plugin yesterday to do port forwarding from a specified port on the master to all of the nodes. The goal is to have a DB such as Mongo running on the master and available on the specified port on all the nodes. </div>
<div><br></div><div>For whatever reason, when the cluster is firing up, the process grinds to a halt when it is running this plugin. </div><div><br></div><div>Any thoughts on what might be the cause? I've tried it both with a port value passed in and specified in the code. I can execute the ssh command below successfully on the nodes. I used nmap to check if I was using a port that I should not be. Everything seems good but clearly something is not working as intended.</div>
<div><br></div><div>Thanks, Chris</div><div><br></div><div><div>from starcluster.clustersetup import ClusterSetup</div><div>from starcluster.logger import log</div><div><br></div><div>class MongoPortForwarding(ClusterSetup):</div>
<div> def __init__(self, port):</div><div> self.port = port</div><div> log.debug("port = %s" % port)</div><div> </div><div> def run(self, nodes, master, user, user_shell, volumes):</div>
<div> <a href="http://log.info">log.info</a>("Number of nodes: %d" % len(nodes))</div><div> for node in nodes:</div><div> if node != master:</div><div> <a href="http://log.info">log.info</a>("Setting up port forwarding for node %s." % node.alias)</div>
<div> #node.ssh.execute("ssh -f -N -L %s:localhost:%s root@master" % (self.port,self.port))</div><div> node.ssh.execute("ssh -f -N -L 1234:localhost:1234 root@master")</div>
</div>