Merge "BUG-985 - finisher queue is unbound"
authormichal rehak <mirehak@cisco.com>
Mon, 12 May 2014 17:57:37 +0000 (17:57 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 12 May 2014 17:57:37 +0000 (17:57 +0000)
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestCommandProvider.java
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestCommiter.java
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestProvider.java
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestRpcProvider.java
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestRpcSender.java
drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestStats.java [new file with mode: 0644]
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/HandshakeManagerImpl.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/RpcUtil.java

index a2c8d8e329d72a102b8739235877085505bbaa9a..209b7ce371d84f4ecf341f0811ac4362bd33f6c8 100644 (file)
@@ -89,6 +89,27 @@ public class DropTestCommandProvider implements CommandProvider {
         }
     }
     
+    public void _showDropStats(CommandInterpreter ci) {
+        if(sessionInitiated) {         
+               ci.println("RPC Test Statistics: " + this.rpcProvider.getStats().toString());
+               ci.println("FRM Test Statistics: " + this.provider.getStats().toString());
+       } else {
+               ci.println("Session not initiated, try again in a few seconds");
+        }
+   }
+    
+    public void _clearDropStats(CommandInterpreter ci) {
+        if(sessionInitiated) {         
+               ci.print("Clearing drop statistics... ");
+               this.rpcProvider.clearStats();
+               this.provider.clearStats();
+               ci.println("Done.");
+
+        } else {
+               ci.println("Session not initiated, try again in a few seconds");
+        }
+  }
+    
     @Override
     public String getHelp() {
         String helpString = "----------------- dropAllPackets--------------\n"
index 1726cedfb04f360b39e359472a36069c6aed3824..06b61c4ce7aa2f85cc799f67f441003ac6e3c94d 100644 (file)
@@ -54,6 +54,18 @@ public class DropTestCommiter implements PacketProcessingListener {
 
     private final DropTestProvider _manager;
 
+    private int _sent;
+    private int _rcvd;
+    
+    public DropTestStats getStats(){
+       return new DropTestStats(this._sent, this._rcvd);
+    }
+    
+    public void clearStats(){
+       this._sent = 0;
+       this._rcvd = 0;
+   }
+
     public DropTestProvider getManager() {
         return this._manager;
     }
@@ -63,9 +75,13 @@ public class DropTestCommiter implements PacketProcessingListener {
     }
 
     public void onPacketReceived(final PacketReceived notification) {
-        LOG.debug("onPacketReceived - Entering - " + notification);
+        // LOG.debug("onPacketReceived - Entering - " + notification);
 
-        // Get the Ingress nodeConnectorRef
+       synchronized(this) {
+               this._rcvd++;
+       }
+       
+       // Get the Ingress nodeConnectorRef
         final NodeConnectorRef ncr = notification.getIngress();
 
         // Get the instance identifier for the nodeConnectorRef
@@ -78,13 +94,13 @@ public class DropTestCommiter implements PacketProcessingListener {
         final NodeKey nodeKey = InstanceIdentifier.<Node, NodeKey>keyOf(nodeInstanceId);
         final byte[] rawPacket = notification.getPayload();
 
-        LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} payload {}",
-                nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(rawPacket));
+        // LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} payload {}",
+        //        nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(rawPacket));
 
         final byte[] srcMac = Arrays.copyOfRange(rawPacket, 6, 12);
 
-        LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} srcMac {}",
-                nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(srcMac));
+        //LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} srcMac {}",
+        //        nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(srcMac));
 
         final MatchBuilder match = new MatchBuilder();
         final EthernetMatchBuilder ethernetMatch = new EthernetMatchBuilder();
@@ -150,9 +166,13 @@ public class DropTestCommiter implements PacketProcessingListener {
         final Flow flow = fb.build();
         final DataModificationTransaction transaction = this._manager.getDataService().beginTransaction();
 
-        LOG.debug("onPacketReceived - About to write flow - " + flow);
+        // LOG.debug("onPacketReceived - About to write flow - " + flow);
         transaction.putConfigurationData(flowInstanceId, flow);
         transaction.commit();
-        LOG.debug("onPacketReceived - About to write flow commited");
+        // LOG.debug("onPacketReceived - About to write flow commited");
+       synchronized(this) {
+               this._sent++;
+       }
+
     }
 }
index db0bcfb77cdbaa8d74203315db577c7435efdc0a..1ec19d38cb87a0f402120ed7917543ac0fe6ab76 100644 (file)
@@ -23,6 +23,14 @@ public class DropTestProvider implements AutoCloseable {
     private Registration<NotificationListener> listenerRegistration;
     private final DropTestCommiter commiter = new DropTestCommiter(this);
 
+    public DropTestStats getStats() {
+       return this.commiter.getStats();
+    }
+    
+    public void clearStats() {
+       this.commiter.clearStats();
+    }
+    
     public DataProviderService getDataService() {
         return this._dataService;
     }
index 283f9c15d52bcc1f16e00bb0411bc456b2987872..4c920122135c83f70401a2ee611d1648302f11da 100644 (file)
@@ -44,6 +44,20 @@ public class DropTestRpcProvider implements AutoCloseable {
         this.listenerRegistration = this.getNotificationService().registerNotificationListener(this.commiter);
         LOG.debug("DropTestProvider Started.");
     }
+    
+    public DropTestStats getStats() {
+       if(this.commiter != null) {
+               return this.commiter.getStats();
+       } else {
+               return new DropTestStats("Not initialized yet.");               
+       }
+    }
+    
+    public void clearStats() {
+       if(this.commiter != null) {
+               this.commiter.clearStats();
+       }
+    }
 
     public void close() {
         try {
index a9d8dc43a1236ea61d357bb8f2a186261e0dd25e..180c6fc63886f2066fd02e57b1dc272e284b43e9 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.openflowplugin.droptest;
 
-import org.apache.commons.codec.binary.Hex;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.DropActionCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.drop.action._case.DropAction;
@@ -49,6 +48,20 @@ public class DropTestRpcSender implements PacketProcessingListener {
 
     private final DropTestRpcProvider _manager;
     private final SalFlowService _flowService;
+    
+    private int _sent;
+    private int _rcvd;
+    private int _excs;
+    
+    public DropTestStats getStats(){
+       return new DropTestStats(this._sent, this._rcvd, this._excs);
+    }
+    
+    public void clearStats(){
+       this._sent = 0;
+       this._rcvd = 0;
+       this._excs = 0;
+   }
 
     public DropTestRpcProvider getManager() {
         return this._manager;
@@ -63,85 +76,103 @@ public class DropTestRpcSender implements PacketProcessingListener {
         this._flowService = flowService;
     }
 
-    public void onPacketReceived(final PacketReceived notification) {
-        LOG.debug("onPacketReceived - Entering - " + notification);
-
-        // Get the Ingress nodeConnectorRef
-        final NodeConnectorRef ncr = notification.getIngress();
-
-        // Get the instance identifier for the nodeConnectorRef
-        final InstanceIdentifier<NodeConnector> ncri = (InstanceIdentifier<NodeConnector>) ncr.getValue();
-        final NodeConnectorKey ncKey = InstanceIdentifier.<NodeConnector, NodeConnectorKey>keyOf(ncri);
-
-        // Get the instanceID for the Node in the tree above us
-        final InstanceIdentifier<Node> nodeInstanceId = ncri.<Node>firstIdentifierOf(Node.class);
-        final NodeKey nodeKey = InstanceIdentifier.<Node, NodeKey>keyOf(nodeInstanceId);
-        final byte[] rawPacket = notification.getPayload();
-
-        LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} payload {}",
-                nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(rawPacket));
-
-        final byte[] srcMac = Arrays.copyOfRange(rawPacket, 6, 12);
-
-        LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} srcMac {}",
-                nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(srcMac));
-
-        final MatchBuilder match = new MatchBuilder();
-        final EthernetMatchBuilder ethernetMatch = new EthernetMatchBuilder();
-        final EthernetSourceBuilder ethSourceBuilder = new EthernetSourceBuilder();
-
-        //TODO: use HEX, use binary form
-        //Hex.decodeHex("000000000001".toCharArray());
-
-        ethSourceBuilder.setAddress(new MacAddress(DropTestUtils.macToString(srcMac)));
-        ethernetMatch.setEthernetSource(ethSourceBuilder.build());
-        match.setEthernetMatch(ethernetMatch.build());
-        final DropActionBuilder dab = new DropActionBuilder();
-        final DropAction dropAction = dab.build();
-        final ActionBuilder ab = new ActionBuilder();
-        ab.setAction(new DropActionCaseBuilder().setDropAction(dropAction).build());
-
-        // Add our drop action to a list
-        final ArrayList<Action> actionList = new ArrayList<Action>();
-        actionList.add(ab.build());
-
-        // Create an Apply Action
-        final ApplyActionsBuilder aab = new ApplyActionsBuilder();
-        aab.setAction(actionList);
-
-        // Wrap our Apply Action in an Instruction
-        final InstructionBuilder ib = new InstructionBuilder();
-        ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
-
-        // Put our Instruction in a list of Instructions
-        final InstructionsBuilder isb = new InstructionsBuilder();;
-        final ArrayList<Instruction> instructions = new ArrayList<Instruction>();
-        instructions.add(ib.build());
-        isb.setInstruction(instructions);
-
-        // Finally build our flow
-        final AddFlowInputBuilder fb = new AddFlowInputBuilder();
-        fb.setMatch(match.build());
-        fb.setInstructions(isb.build());
-        //fb.setId(new FlowId(Long.toString(fb.hashCode)));
-
-        // Construct the flow instance id
-        final InstanceIdentifier<Node> flowInstanceId = InstanceIdentifier
-                .builder(Nodes.class) // File under nodes
-                .child(Node.class, nodeKey).toInstance(); // A particular node indentified by nodeKey
-        fb.setNode(new NodeRef(flowInstanceId));
-
-        fb.setPriority(4);
-        fb.setBufferId(0L);
-        final BigInteger value = new BigInteger("10", 10);
-        fb.setCookie(new FlowCookie(value));
-        fb.setCookieMask(new FlowCookie(value));
-        fb.setTableId(Short.valueOf(((short) 0)));
-        fb.setHardTimeout(300);
-        fb.setIdleTimeout(240);
-        fb.setFlags(new FlowModFlags(false, false, false, false, false));
-
-        // Add flow
-        this.getFlowService().addFlow(fb.build());
+    @Override
+       public void onPacketReceived(final PacketReceived notification) {
+        // LOG.debug("onPacketReceived - Entering - " + notification);
+
+       synchronized(this) {
+               this._rcvd++;
+       }
+       
+       try {
+                       // Get the Ingress nodeConnectorRef
+                       final NodeConnectorRef ncr = notification.getIngress();
+
+                       // Get the instance identifier for the nodeConnectorRef
+                       final InstanceIdentifier<NodeConnector> ncri = (InstanceIdentifier<NodeConnector>) ncr.getValue();
+                       final NodeConnectorKey ncKey = InstanceIdentifier.<NodeConnector, NodeConnectorKey>keyOf(ncri);
+
+                       // Get the instanceID for the Node in the tree above us
+                       final InstanceIdentifier<Node> nodeInstanceId = ncri.<Node>firstIdentifierOf(Node.class);
+                       final NodeKey nodeKey = InstanceIdentifier.<Node, NodeKey>keyOf(nodeInstanceId);
+                       final byte[] rawPacket = notification.getPayload();
+
+                       // LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} payload {}",
+                       //        nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(rawPacket));
+
+                       final byte[] srcMac = Arrays.copyOfRange(rawPacket, 6, 12);
+
+                       //LOG.debug("onPacketReceived - received Packet on Node {} and NodeConnector {} srcMac {}",
+                       //        nodeKey.getId(), ncKey.getId(), Hex.encodeHexString(srcMac));
+
+
+                       final MatchBuilder match = new MatchBuilder();
+                       final EthernetMatchBuilder ethernetMatch = new EthernetMatchBuilder();
+                       final EthernetSourceBuilder ethSourceBuilder = new EthernetSourceBuilder();
+
+                       //TODO: use HEX, use binary form
+                       //Hex.decodeHex("000000000001".toCharArray());
+
+                       ethSourceBuilder.setAddress(new MacAddress(DropTestUtils.macToString(srcMac)));
+                       ethernetMatch.setEthernetSource(ethSourceBuilder.build());
+                       match.setEthernetMatch(ethernetMatch.build());
+                       final DropActionBuilder dab = new DropActionBuilder();
+                       final DropAction dropAction = dab.build();
+                       final ActionBuilder ab = new ActionBuilder();
+                       ab.setAction(new DropActionCaseBuilder().setDropAction(dropAction).build());
+
+                       // Add our drop action to a list
+                       final ArrayList<Action> actionList = new ArrayList<Action>();
+                       actionList.add(ab.build());
+
+                       // Create an Apply Action
+                       final ApplyActionsBuilder aab = new ApplyActionsBuilder();
+                       aab.setAction(actionList);
+
+                       // Wrap our Apply Action in an Instruction
+                       final InstructionBuilder ib = new InstructionBuilder();
+                       ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
+
+                       // Put our Instruction in a list of Instructions
+                       final InstructionsBuilder isb = new InstructionsBuilder();;
+                       final ArrayList<Instruction> instructions = new ArrayList<Instruction>();
+                       instructions.add(ib.build());
+                       isb.setInstruction(instructions);
+
+                       // Finally build our flow
+                       final AddFlowInputBuilder fb = new AddFlowInputBuilder();
+                       fb.setMatch(match.build());
+                       fb.setInstructions(isb.build());
+                       //fb.setId(new FlowId(Long.toString(fb.hashCode)));
+
+                       // Construct the flow instance id
+                       final InstanceIdentifier<Node> flowInstanceId = InstanceIdentifier
+                                       .builder(Nodes.class) // File under nodes
+                                       .child(Node.class, nodeKey).toInstance(); // A particular node identified by nodeKey
+                       fb.setNode(new NodeRef(flowInstanceId));
+
+                       fb.setPriority(4);
+                       fb.setBufferId(0L);
+                       final BigInteger value = new BigInteger("10", 10);
+                       fb.setCookie(new FlowCookie(value));
+                       fb.setCookieMask(new FlowCookie(value));
+                       fb.setTableId(Short.valueOf(((short) 0)));
+                       fb.setHardTimeout(300);
+                       fb.setIdleTimeout(240);
+                       fb.setFlags(new FlowModFlags(false, false, false, false, false));
+
+                       // Add flow
+                       this.getFlowService().addFlow(fb.build());
+
+                       synchronized (this) {
+                               this._sent++;
+                       }
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       LOG.error("dropTestRpc exception: {}", e.toString());
+                       synchronized (this) {
+                               this._excs++;
+                       }
+               }
     }
 }
diff --git a/drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestStats.java b/drop-test/src/main/java/org/opendaylight/openflowplugin/droptest/DropTestStats.java
new file mode 100644 (file)
index 0000000..1e7c275
--- /dev/null
@@ -0,0 +1,48 @@
+package org.opendaylight.openflowplugin.droptest;
+
+public class DropTestStats {
+       private final int _rcvd;
+       private final int _sent;
+       private final int _excs;
+       private final String _message;
+
+       public DropTestStats(int sent, int rcvd) {
+               this._sent = sent;
+               this._rcvd = rcvd;
+               this._excs = 0;
+               this._message = null;
+       }
+       
+       public DropTestStats(int sent, int rcvd, int excs) {
+               this._sent = sent;
+               this._rcvd = rcvd;
+               this._excs = excs;
+               this._message = null;
+       }
+
+               public DropTestStats(String message) {
+               this._sent = -1;
+               this._rcvd = -1;
+               this._excs = -1;
+               this._message = message;
+       }
+       
+       public int getSent() { return this._sent; }
+       public int getRcvd() { return this._rcvd; }
+       public String getMessage() { return this._message; };
+
+       @Override 
+       public String toString() {
+           StringBuilder result = new StringBuilder();
+           if (this._message == null) {
+               result.append("Rcvd: " + this._rcvd);
+               result.append(", Sent: " + this._sent);
+               result.append("; Exceptions: " + this._excs);
+           } else {
+               result.append(this._message);
+           }
+               
+               return result.toString();
+       }
+       
+}
index 09ac196a32a2d8216d84f7e00f8440e647739bca..acd76d6965204b72b73e49d33b0a1a153e11a4bf 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.openflowplugin.openflow.md.core;
 import java.util.List;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesInputBuilder;
@@ -83,7 +84,7 @@ public class HandshakeManagerImpl implements HandshakeManager {
                 // first Hello sending
                 sendHelloMessage(highestVersion, getNextXid());
                 lastProposedVersion = highestVersion;
-                LOG.debug("ret - firstHello+wait");
+                LOG.trace("ret - firstHello+wait");
                 return;
             }
 
@@ -102,18 +103,18 @@ public class HandshakeManagerImpl implements HandshakeManager {
                 // versionBitmap missing at least on one side -> STEP-BY-STEP NEGOTIATION applying 
                 handleStepByStepVersionNegotiation(remoteVersion);
             }
-        } catch (Throwable ex) {
+        } catch (Exception ex) {
             errorHandler.handleException(ex, null);
             connectionAdapter.disconnect();
-            LOG.debug("ret - "+ex.getMessage());
+            LOG.trace("ret - shake fail: {}", ex.getMessage());
         }
     }
 
     /**
      * @param remoteVersion
-     * @throws Throwable 
+     * @throws Exception 
      */
-    private void handleStepByStepVersionNegotiation(Short remoteVersion) throws Throwable {
+    private void handleStepByStepVersionNegotiation(Short remoteVersion) throws Exception {
         LOG.debug("remoteVersion:{} lastProposedVersion:{}, highestVersion:{}", 
                 remoteVersion, lastProposedVersion, highestVersion);
         
@@ -126,13 +127,13 @@ public class HandshakeManagerImpl implements HandshakeManager {
         
         if (remoteVersion == lastProposedVersion) {
             postHandshake(lastProposedVersion, getNextXid());
-            LOG.debug("ret - OK - switch answered with lastProposedVersion");
+            LOG.trace("ret - OK - switch answered with lastProposedVersion");
         } else {
             checkNegotiationStalling(remoteVersion);
 
             if (remoteVersion > (lastProposedVersion == null ? highestVersion : lastProposedVersion)) {
                 // wait for next version
-                LOG.debug("ret - wait");
+                LOG.trace("ret - wait");
             } else {
                 //propose lower version
                 handleLowerVersionProposal(remoteVersion);
@@ -142,9 +143,9 @@ public class HandshakeManagerImpl implements HandshakeManager {
 
     /**
      * @param remoteVersion
-     * @throws Throwable 
+     * @throws Exception 
      */
-    private void handleLowerVersionProposal(Short remoteVersion) throws Throwable {
+    private void handleLowerVersionProposal(Short remoteVersion) throws Exception {
         Short proposedVersion;
         // find the version from header version field
         proposedVersion = proposeNextVersion(remoteVersion);
@@ -152,18 +153,18 @@ public class HandshakeManagerImpl implements HandshakeManager {
         sendHelloMessage(proposedVersion, getNextXid());
 
         if (proposedVersion != remoteVersion) {
-            LOG.debug("ret - sent+wait");
+            LOG.trace("ret - sent+wait");
         } else {
-            LOG.debug("ret - sent+OK");
+            LOG.trace("ret - sent+OK");
             postHandshake(proposedVersion, getNextXid());
         }
     }
 
     /**
      * @param elements
-     * @throws Throwable 
+     * @throws Exception 
      */
-    private void handleVersionBitmapNegotiation(List<Elements> elements) throws Throwable {
+    private void handleVersionBitmapNegotiation(List<Elements> elements) throws Exception {
         Short proposedVersion;
         proposedVersion = proposeCommonBitmapVersion(elements);
         if (lastProposedVersion == null) {
@@ -171,7 +172,7 @@ public class HandshakeManagerImpl implements HandshakeManager {
             sendHelloMessage(proposedVersion, getNextXid());
         }
         postHandshake(proposedVersion, getNextXid());
-        LOG.debug("ret - OK - versionBitmap");
+        LOG.trace("ret - OK - versionBitmap");
     }
     
     /**
@@ -262,9 +263,9 @@ public class HandshakeManagerImpl implements HandshakeManager {
      * send hello reply without versionBitmap
      * @param helloVersion
      * @param helloXid
-     * @throws Throwable 
+     * @throws Exception 
      */
-    private void sendHelloMessage(Short helloVersion, Long helloXid) throws Throwable {
+    private void sendHelloMessage(Short helloVersion, Long helloXid) throws Exception {
         //Short highestVersion = ConnectionConductor.versionOrder.get(0);
         //final Long helloXid = 21L;
         HelloInput helloInput = MessageFactory.createHelloInput(helloVersion, helloXid, versionOrder);
@@ -276,7 +277,7 @@ public class HandshakeManagerImpl implements HandshakeManager {
             RpcResult<Void> helloResult = connectionAdapter.hello(helloInput).get(maxTimeout, maxTimeoutUnit);
             RpcUtil.smokeRpc(helloResult);
             LOG.debug("FIRST HELLO sent.");
-        } catch (Throwable e) {
+        } catch (Exception e) {
             LOG.debug("FIRST HELLO sending failed.");
             throw e;
         }
@@ -287,14 +288,14 @@ public class HandshakeManagerImpl implements HandshakeManager {
      * after handshake set features, register to session
      * @param proposedVersion
      * @param xId
-     * @throws Throwable 
+     * @throws Exception 
      */
-    protected void postHandshake(Short proposedVersion, Long xid) throws Throwable {
+    protected void postHandshake(Short proposedVersion, Long xid) throws Exception {
         // set version
         long maxTimeout = 3000;
         version = proposedVersion;
 
-        LOG.debug("version set: " + proposedVersion);
+        LOG.debug("version set: {}", proposedVersion);
         // request features
         GetFeaturesInputBuilder featuresBuilder = new GetFeaturesInputBuilder();
         featuresBuilder.setVersion(version).setXid(xid);
@@ -317,9 +318,14 @@ public class HandshakeManagerImpl implements HandshakeManager {
                     version, featureOutput.getDatapathId(), featureOutput.getAuxiliaryId());
             
             handshakeListener.onHandshakeSuccessfull(featureOutput, proposedVersion);
-        } catch (Throwable e) {
-            //handshake failed
-            LOG.error("issuing disconnect during handshake, reason: "+e.getMessage());
+        } catch (TimeoutException e) {
+            // handshake failed
+            LOG.warn("issuing disconnect during handshake, reason: future expired", e);
+            connectionAdapter.disconnect();
+            throw e;
+        } catch (Exception e) {
+            // handshake failed
+            LOG.warn("issuing disconnect during handshake, reason - RPC: {}", e.getMessage(), e);
             connectionAdapter.disconnect();
             throw e;
         }
index c56cc174df42cf612f64a56c7c871d123889288b..6852ad8d48f9504067294c00145a9e1bf18d3fd4 100644 (file)
@@ -18,9 +18,9 @@ public abstract class RpcUtil {
 
     /**
      * @param result
-     * @throws Throwable 
+     * @throws Exception 
      */
-    public static void smokeRpc(RpcResult<?> result) throws Throwable {
+    public static void smokeRpc(RpcResult<?> result) throws Exception {
         if (!result.isSuccessful()) {
             Throwable firstCause = null;
             StringBuffer sb = new StringBuffer();