summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-08-24 13:08:49 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-09-08 13:00:47 +0200
commitf100b1a7d1689194f08bb22e1b849c4d840dadd0 (patch)
treeb06370518b7665bae23540ee6a320dd7f4c12090 /v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
parent0db62436d36cb05b6402a7b043db9ea9f1977f58 (diff)
NamingContext.getNameIfPresent should not fail if name is missing
Also makes InterfaceChangeNotificationProducer notification translation code more defensive. The issue was revealed by HC2VPP-216 and HC2VPP-220. Change-Id: I20792a51743ae621d86c1b9066d680bc2303ed82 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
index ffab221ee..b4ea48cf7 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/notification/InterfaceChangeNotificationProducer.java
@@ -80,7 +80,13 @@ public final class InterfaceChangeNotificationProducer implements ManagedNotific
swInterfaceSetFlagsNotification -> {
LOG.trace("Interface notification received: {}", swInterfaceSetFlagsNotification);
// TODO HONEYCOMB-166 this should be lazy
- collector.onNotification(transformNotification(swInterfaceSetFlagsNotification));
+ try {
+ collector.onNotification(transformNotification(swInterfaceSetFlagsNotification));
+ } catch (Exception e) {
+ // There is no need to propagate exception to jvpp rx thread in case of unexpected failures.
+ // We can't do much about it, so lets log the exception.
+ LOG.warn("Failed to process interface notification {}", swInterfaceSetFlagsNotification, e);
+ }
}
);
}