StarCluster - Mailing List Archive

Port Forwarding Plugin

From: Chris Diehl <no email>
Date: Thu, 21 Jun 2012 10:36:22 -0400

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")
Received on Thu Jun 21 2012 - 10:36:44 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject