VOL-2973: ONT Reboot is not bringing ONU back to 'omci-flows-pushed' state
- This issue is seen when openolt adapter is used with openolt-agent
version 2.4.0 or above. However the fix here is backward compatible.
- The fix is to Remove the onu from 'discOnus' map on receiving a "down"
indication for the ONU from openolt-agent (or BBSIM).
Change-Id: I02af2f2f116df5f9bd250ca9a045036ce0abadc5
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 2e879e1..d6cb1e6 100644
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -1221,6 +1221,8 @@
ctx := context.TODO()
logger.Debugw("onu-indication-for-state", log.Fields{"onuIndication": onuInd, "device-id": onuDevice.Id, "operStatus": onuDevice.OperStatus, "adminStatus": onuDevice.AdminState})
if onuInd.AdminState == "down" {
+ // The ONU has gone admin_state "down" and we expect the ONU to send discovery again
+ dh.discOnus.Delete(onuDevice.SerialNumber)
// Tests have shown that we sometimes get OperState as NOT down even if AdminState is down, forcing it
if onuInd.OperState != "down" {
logger.Warnw("onu-admin-state-down", log.Fields{"operState": onuInd.OperState})