Defend agains exceptions in application initialisation
Application initialisation code (as found in initialize function) can raise an exception, which would break entire pipeline set-up. This fix catches and logs the exception. The application is not removed - it can continue to work on a best-effort basis. TrivialFix Change-Id: I5c2f00578ba5208ab7fed4441e4919cd3d71ae34
This commit is contained in:
parent
8fd27641b0
commit
65ebe3a52f
|
@ -112,8 +112,11 @@ class Datapath(object):
|
||||||
|
|
||||||
self.write_datapath_allocation()
|
self.write_datapath_allocation()
|
||||||
|
|
||||||
for app in self.apps.values():
|
for name, app in self.apps.items():
|
||||||
app.initialize()
|
try:
|
||||||
|
app.initialize()
|
||||||
|
except Exception:
|
||||||
|
LOG.exception('Failed to initialize %s (%s)', name, app)
|
||||||
|
|
||||||
for edge in self._layout.edges:
|
for edge in self._layout.edges:
|
||||||
self._install_edge(edge)
|
self._install_edge(edge)
|
||||||
|
|
Loading…
Reference in New Issue