geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject incubator-geode git commit: GEODE-1115 membership-port-range is not being established properly
Date Tue, 22 Mar 2016 15:22:55 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 822bdc116 -> c38ae1d89


GEODE-1115 membership-port-range is not being established properly

incorporating changes from code review by Jianxia and Hitesh


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c38ae1d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c38ae1d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c38ae1d8

Branch: refs/heads/develop
Commit: c38ae1d89c9dd5717e57929978ebbba0f4dd11b0
Parents: 822bdc1
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Tue Mar 22 08:21:22 2016 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Tue Mar 22 08:22:40 2016 -0700

----------------------------------------------------------------------
 .../internal/membership/gms/messenger/JGroupsMessenger.java    | 4 ++--
 .../internal/membership/gms/messenger/jgroups-config.xml       | 2 +-
 .../internal/membership/gms/messenger/jgroups-mcast.xml        | 2 +-
 .../gemfire/distributed/DistributedSystemDUnitTest.java        | 6 ++++++
 4 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c38ae1d8/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 9476deb..f94791f 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -236,11 +236,11 @@ public class JGroupsMessenger implements Messenger {
     int port = Integer.getInteger("gemfire.jg-bind-port", 0);
     if (port != 0) {
       properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE_START", ""+port);
-      properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE_END", ""+0);
+      properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE", ""+0);
     } else {
       int[] ports = dc.getMembershipPortRange();
       properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE_START", ""+ports[0]);
-      properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE_END", ""+(ports[1]-ports[0]));
+      properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE", ""+(ports[1]-ports[0]));
     }
     
     properties = replaceStrings(properties, "UDP_FRAGMENT_SIZE", ""+dc.getUdpFragmentSize());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c38ae1d8/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
b/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
index 8413364..ff7137b 100755
--- a/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
+++ b/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
@@ -20,7 +20,7 @@ limitations under the License.
 <com.gemstone.gemfire.distributed.internal.membership.gms.messenger.Transport
   BIND_ADDR_SETTING
   bind_port="MEMBERSHIP_PORT_RANGE_START"
-  port_range="MEMBERSHIP_PORT_RANGE_END"
+  port_range="MEMBERSHIP_PORT_RANGE"
   mcast_port="0"
   tos="16"
   ip_mcast="false"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c38ae1d8/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
b/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
index ff5a8e1..c71f972 100755
--- a/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
+++ b/geode-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
@@ -20,7 +20,7 @@ limitations under the License.
 <com.gemstone.gemfire.distributed.internal.membership.gms.messenger.Transport
   BIND_ADDR_SETTING
   bind_port="MEMBERSHIP_PORT_RANGE_START"
-  port_range="MEMBERSHIP_PORT_RANGE_END"
+  port_range="MEMBERSHIP_PORT_RANGE"
 
   mcast_addr="MCAST_ADDRESS"
   mcast_port="MCAST_PORT"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c38ae1d8/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
index f34fd7e..a274ba7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
@@ -41,6 +41,8 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystemJUnitT
 import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
 import com.gemstone.gemfire.distributed.internal.SizeableRunnable;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroupsMessenger;
 import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
@@ -350,7 +352,11 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase
{
     cache.addCacheServer();
     DistributionManager dm = (DistributionManager) system.getDistributionManager();
     InternalDistributedMember idm = dm.getDistributionManagerId();
+    GMSMembershipManager manager = (GMSMembershipManager)MembershipManagerHelper.getMembershipManager(system);
+    JGroupsMessenger messenger = (JGroupsMessenger)manager.getServices().getMessenger();
+    String jgConfig = messenger.getJGroupsStackConfig();
     system.disconnect();
+    assertTrue("expected to find port_range=\"2\" in " + jgConfig, jgConfig.contains("port_range=\"2\""));
     assertTrue(idm.getPort() <= portEndRange);
     assertTrue(idm.getPort() >= portStartRange);
     assertTrue(idm.getDirectChannelPort() <= portEndRange);


Mime
View raw message