VOL-4197: Add uniport to OnuGemInfo cache in flow-manager module.
Otherwise, during cleanup the uni-ports are not detected and the
cleanup handler leaves out stale entries for the {pon,onu,uni}
tuple on kv store causing failures on new flow-adds due to
meter mismatch (from stale entries on etcd).
Change-Id: Ibacc053fd3435c3d8185b3f9b075861d21a2e4bc
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 4a84b78..50c73ce 100644
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -940,7 +940,7 @@
}
logger.Debugw(ctx, "publish-pon-metrics", log.Fields{"pon-port": port.Label})
- onuGemInfoLst := dh.flowMgr[intfID].getOnuGemInfoList()
+ onuGemInfoLst := dh.flowMgr[intfID].getOnuGemInfoList(ctx)
if len(onuGemInfoLst) > 0 {
go dh.portStats.collectOnuAndGemStats(ctx, onuGemInfoLst)
}
@@ -1756,7 +1756,7 @@
var ponPort uint32
for ponPort = 0; ponPort < dh.totalPonPorts; ponPort++ {
var err error
- onuGemData := dh.flowMgr[ponPort].getOnuGemInfoList()
+ onuGemData := dh.flowMgr[ponPort].getOnuGemInfoList(ctx)
for i, onu := range onuGemData {
onuID := make([]uint32, 1)
logger.Debugw(ctx, "onu-data", log.Fields{"onu": onu})