Committed by
Gerrit Code Review
Shutdown cleanup; hunt for exceptions continues
Change-Id: I8cbfaec0820d63f5122a82dd25ba249ba1f690a4
Showing
5 changed files
with
19 additions
and
5 deletions
| ... | @@ -76,6 +76,7 @@ public class GossipComponentConfigStore | ... | @@ -76,6 +76,7 @@ public class GossipComponentConfigStore |
| 76 | 76 | ||
| 77 | @Deactivate | 77 | @Deactivate |
| 78 | public void deactivate() { | 78 | public void deactivate() { |
| 79 | + properties.destroy(); | ||
| 79 | log.info("Stopped"); | 80 | log.info("Stopped"); |
| 80 | } | 81 | } |
| 81 | 82 | ... | ... |
| ... | @@ -498,7 +498,7 @@ public class EventuallyConsistentMapImpl<K, V> | ... | @@ -498,7 +498,7 @@ public class EventuallyConsistentMapImpl<K, V> |
| 498 | return; | 498 | return; |
| 499 | } | 499 | } |
| 500 | 500 | ||
| 501 | - if (underHighLoad()) { | 501 | + if (underHighLoad() || destroyed) { |
| 502 | return; | 502 | return; |
| 503 | } | 503 | } |
| 504 | 504 | ||
| ... | @@ -700,10 +700,13 @@ public class EventuallyConsistentMapImpl<K, V> | ... | @@ -700,10 +700,13 @@ public class EventuallyConsistentMapImpl<K, V> |
| 700 | } | 700 | } |
| 701 | } | 701 | } |
| 702 | 702 | ||
| 703 | - private final class InternalEventListener implements | 703 | + private final class InternalEventListener implements ClusterMessageHandler { |
| 704 | - ClusterMessageHandler { | ||
| 705 | @Override | 704 | @Override |
| 706 | public void handle(ClusterMessage message) { | 705 | public void handle(ClusterMessage message) { |
| 706 | + if (destroyed) { | ||
| 707 | + return; | ||
| 708 | + } | ||
| 709 | + | ||
| 707 | log.debug("Received update event from peer: {}", message.sender()); | 710 | log.debug("Received update event from peer: {}", message.sender()); |
| 708 | Collection<AbstractEntry<K, V>> events = serializer.decode(message.payload()); | 711 | Collection<AbstractEntry<K, V>> events = serializer.decode(message.payload()); |
| 709 | 712 | ... | ... |
| ... | @@ -234,6 +234,9 @@ public class DistributedGroupStore | ... | @@ -234,6 +234,9 @@ public class DistributedGroupStore |
| 234 | 234 | ||
| 235 | @Deactivate | 235 | @Deactivate |
| 236 | public void deactivate() { | 236 | public void deactivate() { |
| 237 | + groupStoreEntriesByKey.destroy(); | ||
| 238 | + groupStoreEntriesById.destroy(); | ||
| 239 | + auditPendingReqQueue.destroy(); | ||
| 237 | log.info("Stopped"); | 240 | log.info("Stopped"); |
| 238 | } | 241 | } |
| 239 | 242 | ... | ... |
| ... | @@ -103,6 +103,7 @@ public abstract class AbstractOpenFlowSwitch implements OpenFlowSwitchDriver { | ... | @@ -103,6 +103,7 @@ public abstract class AbstractOpenFlowSwitch implements OpenFlowSwitchDriver { |
| 103 | try { | 103 | try { |
| 104 | this.write(m); | 104 | this.write(m); |
| 105 | } catch (RejectedExecutionException e) { | 105 | } catch (RejectedExecutionException e) { |
| 106 | + log.warn(e.getMessage()); | ||
| 106 | if (!e.getMessage().contains(SHUTDOWN_MSG)) { | 107 | if (!e.getMessage().contains(SHUTDOWN_MSG)) { |
| 107 | throw e; | 108 | throw e; |
| 108 | } | 109 | } |
| ... | @@ -116,6 +117,7 @@ public abstract class AbstractOpenFlowSwitch implements OpenFlowSwitchDriver { | ... | @@ -116,6 +117,7 @@ public abstract class AbstractOpenFlowSwitch implements OpenFlowSwitchDriver { |
| 116 | try { | 117 | try { |
| 117 | this.write(msgs); | 118 | this.write(msgs); |
| 118 | } catch (RejectedExecutionException e) { | 119 | } catch (RejectedExecutionException e) { |
| 120 | + log.warn(e.getMessage()); | ||
| 119 | if (!e.getMessage().contains(SHUTDOWN_MSG)) { | 121 | if (!e.getMessage().contains(SHUTDOWN_MSG)) { |
| 120 | throw e; | 122 | throw e; |
| 121 | } | 123 | } | ... | ... |
| ... | @@ -52,10 +52,15 @@ alias oi='setPrimaryInstance' | ... | @@ -52,10 +52,15 @@ alias oi='setPrimaryInstance' |
| 52 | # alias go='ob && ot && onos -w' | 52 | # alias go='ob && ot && onos -w' |
| 53 | alias pub='onos-push-update-bundle' | 53 | alias pub='onos-push-update-bundle' |
| 54 | 54 | ||
| 55 | -# Short-hand for tailing the ONOS (karaf) log | 55 | +# Short-hand for tailing and searching the ONOS (karaf) log |
| 56 | alias tl='$ONOS_ROOT/tools/dev/bin/onos-local-log' | 56 | alias tl='$ONOS_ROOT/tools/dev/bin/onos-local-log' |
| 57 | -alias tlo='tl | grep --colour=always -E -e "org.onlab|org.onosproject"' | ||
| 58 | alias ll='less $KARAF_LOG' | 57 | alias ll='less $KARAF_LOG' |
| 58 | +alias gl='grep $KARAF_LOG --colour=auto -E -e ' | ||
| 59 | + | ||
| 60 | +function filterLog { | ||
| 61 | + tl | grep --colour=always -E -e "${1-org.onlab|org.onosproject}" | ||
| 62 | +} | ||
| 63 | +alias tlo='filterLog' | ||
| 59 | 64 | ||
| 60 | # Pretty-print JSON output | 65 | # Pretty-print JSON output |
| 61 | alias pp='python -m json.tool' | 66 | alias pp='python -m json.tool' | ... | ... |
-
Please register or login to post a comment