From: rh362j Date: Mon, 2 Sep 2019 14:13:25 +0000 (+0300) Subject: [RICPLT-1852] Supports E2T Initialize + increase number of rmr send retries + logs... X-Git-Tag: 2.0.10~24 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=01225af2476518e3b88904081e34a7d43f5568a7;p=ric-plt%2Fe2mgr.git [RICPLT-1852] Supports E2T Initialize + increase number of rmr send retries + logs + remove meid work around Change-Id: I6e3ae212ddde48a2cb1d94baff2ba5d14b079a21 Signed-off-by: rh362j --- diff --git a/E2Manager/handlers/e2_term_init_notification_handler.go b/E2Manager/handlers/e2_term_init_notification_handler.go index 7299910..cec0bfc 100644 --- a/E2Manager/handlers/e2_term_init_notification_handler.go +++ b/E2Manager/handlers/e2_term_init_notification_handler.go @@ -41,8 +41,9 @@ func NewE2TermInitNotificationHandler(ranReconnectionManager *managers.RanReconn func (handler E2TermInitNotificationHandler) Handle(logger *logger.Logger, e2Sessions sessions.E2Sessions, request *models.NotificationRequest, messageChannel chan<- *models.NotificationResponse) { - nbIdentityList, err := handler.rnibReaderProvider().GetListNodebIds() + logger.Infof("#E2TermInitNotificationHandler.Handle - Handling E2_TERM_INIT") + nbIdentityList, err := handler.rnibReaderProvider().GetListNodebIds() if err != nil { logger.Errorf("#E2TermInitNotificationHandler.Handle - Failed to get nodes list from RNIB. Error: %s", err.Error()) return @@ -63,5 +64,6 @@ func (handler E2TermInitNotificationHandler) Handle(logger *logger.Logger, e2Ses } } } + logger.Infof("#E2TermInitNotificationHandler.Handle - Completed handling of E2_TERM_INIT") } diff --git a/E2Manager/handlers/ran_lost_connection_handler.go b/E2Manager/handlers/ran_lost_connection_handler.go index 1da2d12..e899202 100644 --- a/E2Manager/handlers/ran_lost_connection_handler.go +++ b/E2Manager/handlers/ran_lost_connection_handler.go @@ -35,12 +35,7 @@ func NewRanLostConnectionHandler(ranReconnectionManager managers.IRanReconnectio } func (handler RanLostConnectionHandler) Handle(logger *logger.Logger, e2Sessions sessions.E2Sessions, request *models.NotificationRequest, messageChannel chan<- *models.NotificationResponse) { - ranName := request.TransactionId - - // TODO: check with E2T dev why does request.RanName (MEID) does not contain the ran name (in case sim is down) - if len(request.RanName) > 0 { - ranName = request.RanName - } + ranName := request.RanName logger.Warnf("#RanLostConnectionHandler.Handle - RAN name: %s - Received lost connection notification", ranName) diff --git a/E2Manager/managers/ran_setup_manager.go b/E2Manager/managers/ran_setup_manager.go index a66d4f1..6297467 100644 --- a/E2Manager/managers/ran_setup_manager.go +++ b/E2Manager/managers/ran_setup_manager.go @@ -53,7 +53,7 @@ func (m *RanSetupManager) updateConnectionStatusConnecting(nodebInfo *entities.N if err != nil { m.logger.Errorf("#RanSetupManager.updateConnectionStatusConnecting - Ran name: %s - Failed updating RAN's connection status to CONNECTING : %s", nodebInfo.RanName, err) } else { - m.logger.Errorf("#RanSetupManager.updateConnectionStatusConnecting - Ran name: %s - Successfully updated rNib. RAN's current connection status: CONNECTING, RAN's current connection attempts: %d", nodebInfo.RanName, nodebInfo.ConnectionAttempts) + m.logger.Infof("#RanSetupManager.updateConnectionStatusConnecting - Ran name: %s - Successfully updated rNib. RAN's current connection status: CONNECTING, RAN's current connection attempts: %d", nodebInfo.RanName, nodebInfo.ConnectionAttempts) } return err } @@ -67,7 +67,7 @@ func (m *RanSetupManager) updateConnectionStatusDisconnected(nodebInfo *entities if err != nil { m.logger.Errorf("#RanSetupManager.updateConnectionStatusDisconnected - Ran name: %s - Failed updating RAN's connection status to DISCONNECTED : %s", nodebInfo.RanName, err) } else { - m.logger.Errorf("#RanSetupManager.updateConnectionStatusDisconnected - Ran name: %s - Successfully updated rNib. RAN's current connection status: DISCONNECTED, RAN's current connection attempts: %d", nodebInfo.RanName, nodebInfo.ConnectionAttempts) + m.logger.Infof("#RanSetupManager.updateConnectionStatusDisconnected - Ran name: %s - Successfully updated rNib. RAN's current connection status: DISCONNECTED, RAN's current connection attempts: %d", nodebInfo.RanName, nodebInfo.ConnectionAttempts) } return err } @@ -85,7 +85,7 @@ func (m *RanSetupManager) prepareSetupRequest(nodebInfo *entities.NodebInfo) (in return rmrMsgType, request, nil } - m.logger.Errorf("#RanSetupManager.ExecuteSetup - Unsupported nodebInfo.E2ApplicationProtocol %d ", nodebInfo.E2ApplicationProtocol) + m.logger.Errorf("#RanSetupManager.prepareSetupRequest - Unsupported nodebInfo.E2ApplicationProtocol %d ", nodebInfo.E2ApplicationProtocol) return 0, nil, e2managererrors.NewInternalError() } diff --git a/E2Manager/rmrCgo/rmrCgoApi.go b/E2Manager/rmrCgo/rmrCgoApi.go index 9b242c4..1bac250 100644 --- a/E2Manager/rmrCgo/rmrCgoApi.go +++ b/E2Manager/rmrCgo/rmrCgoApi.go @@ -46,6 +46,10 @@ func (*Context) Init(port string, maxMsgSize int, flags int, logger *logger.Logg } } logger.Infof("#rmrCgoApi.Init - RMR router has been initiated") + + // Configure the rmr to make rounds of attempts to send a message before notifying the application that it should retry. + // Each round is about 1000 attempts with a short sleep between each round. + C.rmr_set_stimeout(ctx.RmrCtx, C.int(1000)) r := RmrMessenger(ctx) return &r }