Change-Id: Ia5923f200b6c7a8888d4e3c96fdf8358603d4ac9
Signed-off-by: Jon Castro <castro.jon@gmail.com>
import javax.annotation.concurrent.GuardedBy;
import org.opendaylight.mdsal.common.api.TransactionChainClosedException;
import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
import javax.annotation.concurrent.GuardedBy;
import org.opendaylight.mdsal.common.api.TransactionChainClosedException;
import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
+import org.opendaylight.openflowplugin.api.ConnectionException;
import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
final String errMsg = String.format("Device connection is closed for Node : %s.",
getDeviceInfo().getNodeId());
LOG.debug(errMsg);
final String errMsg = String.format("Device connection is closed for Node : %s.",
getDeviceInfo().getNodeId());
LOG.debug(errMsg);
- resultFuture.setException(new IllegalStateException(errMsg));
+ resultFuture.setException(new ConnectionException(errMsg));
return;
}
if ( ! iterator.hasNext()) {
return;
}
if ( ! iterator.hasNext()) {
import javax.annotation.Nonnull;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import javax.annotation.Nonnull;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
+import org.opendaylight.openflowplugin.api.ConnectionException;
import org.opendaylight.openflowplugin.api.openflow.OFPContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
import org.opendaylight.openflowplugin.api.openflow.OFPContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
LOG.trace("Gathering for node {} failure: ", deviceInfo.getLOGValue(), throwable);
}
calculateTimerDelay(timeCounter);
LOG.trace("Gathering for node {} failure: ", deviceInfo.getLOGValue(), throwable);
}
calculateTimerDelay(timeCounter);
- if (throwable instanceof IllegalStateException) {
+ if (throwable instanceof ConnectionException) {
+ // ConnectionException is raised by StatisticsContextImpl class when the connections
+ // move to RIP state. In this particular case, there is no need to reschedule
+ // because this statistics manager should be closed soon
+ LOG.warn("Node {} is no more connected, stopping the statistics collection",
+ deviceInfo.getLOGValue(),throwable);
stopScheduling(deviceInfo);
} else {
stopScheduling(deviceInfo);
} else {
+ LOG.warn("Unexpected error occurred during statistics collection for node {}, rescheduling " +
+ "statistics collections", deviceInfo.getLOGValue(),throwable);
scheduleNextPolling(deviceState, deviceInfo, statisticsContext, timeCounter);
}
}
scheduleNextPolling(deviceState, deviceInfo, statisticsContext, timeCounter);
}
}
+ message.getInPort().toString()\r
+ "]]]]}], _packetInReason=class org.opendaylight.yang.gen.v1.urn.opendaylight."\r
+ "packet.service.rev130709.SendToController, _payload=[115, 101, 110, 100, 79, 117,"\r
+ message.getInPort().toString()\r
+ "]]]]}], _packetInReason=class org.opendaylight.yang.gen.v1.urn.opendaylight."\r
+ "packet.service.rev130709.SendToController, _payload=[115, 101, 110, 100, 79, 117,"\r
- + " 116, 112, 117, 116, 77, 115, 103, 95, 84, 69, 83, 84], augmentation=[]]]";\r
+ + " 116, 112, 117, 116, 77, 115, 103, 95, 84, 69, 83, 84], , augmentation=[]]]";\r
Assert.assertEquals(expectedString, salPacketIn.toString());\r
LOG.debug("Test translate done.");\r
}\r
Assert.assertEquals(expectedString, salPacketIn.toString());\r
LOG.debug("Test translate done.");\r
}\r