Adding logs to properly follow reboot scenarios
Change-Id: I16aa4347e6225fd7986f317661ba9c3ed5bcccd4
diff --git a/VERSION b/VERSION
index 0eed1a2..ef8e66f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.12.0
+1.12.1-dev
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index c9068bd..9b99c79 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -322,7 +322,11 @@
}
for _, onu := range pon.Onus {
- _ = onu.InternalState.Event(OnuTxDisable)
+ err := onu.InternalState.Event(OnuTxDisable)
+ oltLogger.WithFields(log.Fields{
+ "oltId": o.ID,
+ "onuId": onu.ID,
+ }).Errorf("Error disabling ONUs on OLT soft reboot: %v", err)
}
}
} else {
@@ -331,7 +335,11 @@
// ONUs are not automatically disabled when a PON goes down
// as it's possible that it's an admin down and in that case the ONUs need to keep their state
for _, onu := range pon.Onus {
- _ = onu.InternalState.Event(OnuTxDisable)
+ err := onu.InternalState.Event(OnuTxDisable)
+ oltLogger.WithFields(log.Fields{
+ "oltId": o.ID,
+ "onuId": onu.ID,
+ }).Errorf("Error disabling ONUs on OLT reboot: %v", err)
}
}
}
@@ -342,6 +350,10 @@
// terminate the OLT's processOltMessages go routine
close(o.channel)
+ oltLogger.WithFields(log.Fields{
+ "oltId": o.ID,
+ }).Infof("Waiting OLT restart for... (%ds)", rebootDelay)
+
//Prevents Enable to progress before the reboot is completed (VOL-4616)
o.Lock()
o.enableContextCancel()
@@ -400,6 +412,10 @@
}).Warnf("Stopping OLT gRPC server")
o.OltServer.Stop()
o.OltServer = nil
+ } else {
+ oltLogger.WithFields(log.Fields{
+ "oltId": o.SerialNumber,
+ }).Warnf("OLT gRPC server is already stopped")
}
}