VOL-1100 Flow priority, fix EAP after OLT reboot
Change-Id: If48822ccfce4945de634eb7a82c3604b9e42276b
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index 596004d..a6ec890 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -814,9 +814,16 @@
for flow in flows:
try:
self.flow_mgr.add_flow(flow, is_down_stream)
- except Exception as e:
- self.log.exception('failed-to-install-flow', e=e,
+ except grpc.RpcError as grpc_e:
+ if grpc_e.code() == grpc.StatusCode.ALREADY_EXISTS:
+ self.log.warn('flow already exists', e=grpc_e,
flow=flow)
+ else:
+ self.log.error('failed to add flow', flow=flow,
+ e=grpc_e)
+ except Exception as e:
+ self.log.error('failed to add flow', flow=flow, e=e)
+
# There has to be a better way to do this
def ip_hex(self, ip):