[Swift-commit] cog r3421

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jun 6 18:10:03 CDT 2012


------------------------------------------------------------------------
r3421 | davidkelly999 | 2012-06-06 17:31:37 -0500 (Wed, 06 Jun 2012) | 5 lines

Coaster port assignments were not honoring GLOBUS_TCP_PORT_RANGE after the 690 fixes 
This was causing issues when not specifying ports with persistent coasters
I believe it was also affecting bootstrapping
 

------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java	(revision 3420)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/LocalTCPService.java	(working copy)
@@ -32,6 +32,7 @@
 import org.globus.cog.karajan.workflow.service.channels.KarajanChannel;
 import org.globus.cog.karajan.workflow.service.channels.TCPChannel;
 import org.globus.common.CoGProperties;
+import org.globus.net.PortRange;
 
 public class LocalTCPService implements Registering, Service, Runnable {
     public static final Logger logger = Logger.getLogger(LocalTCPService.class);
@@ -100,6 +101,10 @@
         try {
             channel = ServerSocketChannel.open();
             channel.configureBlocking(true);
+            if(port == 0) {
+              PortRange portRange = PortRange.getTcpInstance();
+              port = portRange.getFreePort(port);
+            }
             channel.socket().bind(new InetSocketAddress(port));
             
             if (serverThread == null) {



More information about the Swift-commit mailing list