[StarCluster] Port Forwarding Plugin
Chris Diehl
cpdiehl at gmail.com
Thu Jun 21 10:36:22 EDT 2012
Hi All,
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.
For whatever reason, when the cluster is firing up, the process grinds to a
halt when it is running this plugin.
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.
Thanks, Chris
from starcluster.clustersetup import ClusterSetup
from starcluster.logger import log
class MongoPortForwarding(ClusterSetup):
def __init__(self, port):
self.port = port
log.debug("port = %s" % port)
def run(self, nodes, master, user, user_shell, volumes):
log.info("Number of nodes: %d" % len(nodes))
for node in nodes:
if node != master:
log.info("Setting up port forwarding for node %s." %
node.alias)
#node.ssh.execute("ssh -f -N -L %s:localhost:%s root at master"
% (self.port,self.port))
node.ssh.execute("ssh -f -N -L 1234:localhost:1234
root at master")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/starcluster/attachments/20120621/ba463432/attachment.htm
More information about the StarCluster
mailing list