[StarCluster] Port Forwarding Plugin
Justin Riley
jtriley at MIT.EDU
Tue Jul 31 18:41:24 EDT 2012
Hey Chris,
Once again, my apologies for the delay. I think using
node.ssh.execute_async should solve your immediate problem with the
plugin but I will test this and get back to you with details on why.
Taking a step back, I don't think this plugin is really necessary. I
already, by default, allow all traffic between nodes in the cluster's
security group so mongo should be able to listen on the public interface
(ie master:$port) and be accessible to all nodes without being wide open
to the world. I just looked at the docs and this clearly needs to be
documented. Added an issue[1] so I don't forget to add it in.
HTH,
~Justin
[1] https://github.com/jtriley/StarCluster/issues/132
On Thu, Jun 21, 2012 at 10:36:22AM -0400, Chris Diehl wrote:
> 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):
> [1]log.info("Number of nodes: %d" % len(nodes))
> for node in nodes:
> if node != master:
> [2]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")
>
> References
>
> Visible links
> 1. http://log.info/
> 2. http://log.info/
> _______________________________________________
> StarCluster mailing list
> StarCluster at mit.edu
> http://mailman.mit.edu/mailman/listinfo/starcluster
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/starcluster/attachments/20120731/c409f270/attachment.bin
More information about the StarCluster
mailing list