Thomas Vachuska
Committed by Gerrit Code Review

Shutdown cleanup; hunt for exceptions continues

Change-Id: I8cbfaec0820d63f5122a82dd25ba249ba1f690a4
......@@ -76,6 +76,7 @@ public class GossipComponentConfigStore
@Deactivate
public void deactivate() {
properties.destroy();
log.info("Stopped");
}
......
......@@ -498,7 +498,7 @@ public class EventuallyConsistentMapImpl<K, V>
return;
}
if (underHighLoad()) {
if (underHighLoad() || destroyed) {
return;
}
......@@ -700,10 +700,13 @@ public class EventuallyConsistentMapImpl<K, V>
}
}
private final class InternalEventListener implements
ClusterMessageHandler {
private final class InternalEventListener implements ClusterMessageHandler {
@Override
public void handle(ClusterMessage message) {
if (destroyed) {
return;
}
log.debug("Received update event from peer: {}", message.sender());
Collection<AbstractEntry<K, V>> events = serializer.decode(message.payload());
......
......@@ -234,6 +234,9 @@ public class DistributedGroupStore
@Deactivate
public void deactivate() {
groupStoreEntriesByKey.destroy();
groupStoreEntriesById.destroy();
auditPendingReqQueue.destroy();
log.info("Stopped");
}
......
......@@ -103,6 +103,7 @@ public abstract class AbstractOpenFlowSwitch implements OpenFlowSwitchDriver {
try {
this.write(m);
} catch (RejectedExecutionException e) {
log.warn(e.getMessage());
if (!e.getMessage().contains(SHUTDOWN_MSG)) {
throw e;
}
......@@ -116,6 +117,7 @@ public abstract class AbstractOpenFlowSwitch implements OpenFlowSwitchDriver {
try {
this.write(msgs);
} catch (RejectedExecutionException e) {
log.warn(e.getMessage());
if (!e.getMessage().contains(SHUTDOWN_MSG)) {
throw e;
}
......
......@@ -52,10 +52,15 @@ alias oi='setPrimaryInstance'
# alias go='ob && ot && onos -w'
alias pub='onos-push-update-bundle'
# Short-hand for tailing the ONOS (karaf) log
# Short-hand for tailing and searching the ONOS (karaf) log
alias tl='$ONOS_ROOT/tools/dev/bin/onos-local-log'
alias tlo='tl | grep --colour=always -E -e "org.onlab|org.onosproject"'
alias ll='less $KARAF_LOG'
alias gl='grep $KARAF_LOG --colour=auto -E -e '
function filterLog {
tl | grep --colour=always -E -e "${1-org.onlab|org.onosproject}"
}
alias tlo='filterLog'
# Pretty-print JSON output
alias pp='python -m json.tool'
......