PMs are missing because OMCI processor has not started before PM FSM.
Wait for OMCI processor in PM module to start before starting PM FSM.
Change-Id: I10707d8626f1c11f97946307fa7343dcab7b4fb5
diff --git a/internal/pkg/pmmgr/onu_metrics_manager.go b/internal/pkg/pmmgr/onu_metrics_manager.go
index 25befe2..066339e 100755
--- a/internal/pkg/pmmgr/onu_metrics_manager.go
+++ b/internal/pkg/pmmgr/onu_metrics_manager.go
@@ -1031,7 +1031,7 @@
}
// ProcessOmciMessages - TODO: add comment
-func (mm *OnuMetricsManager) ProcessOmciMessages(ctx context.Context) {
+func (mm *OnuMetricsManager) ProcessOmciMessages(ctx context.Context, waitForOmciProcessor *sync.WaitGroup) {
logger.Infow(ctx, "Start routine to process OMCI-GET messages for device-id", log.Fields{"device-id": mm.deviceID})
// Flush metric collection channels to be safe.
// It is possible that there is stale data on this channel if the ProcessOmciMessages routine
@@ -1040,6 +1040,7 @@
// is stopped - as a result of ONU going down.
mm.flushMetricCollectionChannels(ctx)
mm.updateOmciProcessingStatus(true)
+ waitForOmciProcessor.Done()
for {
select {
case <-mm.StopProcessingOmciResponses: // stop this routine