X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhandlers%2Fhttpmsghandlers%2Fsetup_request_handler.go;h=19c11826ed03857fb98ddb1e3fabd5ad2f5fb32d;hb=15f8f917ea8d0d7ec8398d8a95f2aff31e98d4f4;hp=981e9c6b441931b5ff07b0b50742418031010a88;hpb=99e39b485bd66dad8afadbc1f3c3c3b0ca3569b5;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/httpmsghandlers/setup_request_handler.go b/E2Manager/handlers/httpmsghandlers/setup_request_handler.go index 981e9c6..19c1182 100644 --- a/E2Manager/handlers/httpmsghandlers/setup_request_handler.go +++ b/E2Manager/handlers/httpmsghandlers/setup_request_handler.go @@ -114,13 +114,12 @@ func (h *SetupRequestHandler) connectExistingRanWithoutAssociatedE2TAddress(node if err != nil { h.logger.Errorf("#SetupRequestHandler.connectExistingRanWithoutAssociatedE2TAddress - RAN name: %s - failed selecting E2T instance", nodebInfo.RanName) - // TODO: reset connection attempts? - - if nodebInfo.ConnectionStatus == entities.ConnectionStatus_DISCONNECTED { + if nodebInfo.ConnectionStatus == entities.ConnectionStatus_DISCONNECTED && nodebInfo.ConnectionAttempts == 0 { return err } nodebInfo.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED + nodebInfo.ConnectionAttempts = 0 updateError := h.rNibDataService.UpdateNodebInfo(nodebInfo) if updateError != nil { @@ -162,11 +161,11 @@ func (h *SetupRequestHandler) connectExistingRanWithAssociatedE2TAddress(nodebIn err := h.rNibDataService.UpdateNodebInfo(nodebInfo) if err != nil { - h.logger.Errorf("#SetupRequestHandler.connectExistingRanWithAssociatedE2TAddress - RAN name: %s - failed updating nodeb in rNib. error: %s", nodebInfo.RanName, err) + h.logger.Errorf("#SetupRequestHandler.connectExistingRanWithAssociatedE2TAddress - RAN name: %s - failed resetting connection attempts of RAN. error: %s", nodebInfo.RanName, err) return e2managererrors.NewRnibDbError() } - h.logger.Infof("#SetupRequestHandler.connectExistingRanWithAssociatedE2TAddress - RAN name: %s - successfully updated nodeb in rNib", nodebInfo.RanName) + h.logger.Infof("#SetupRequestHandler.connectExistingRanWithAssociatedE2TAddress - RAN name: %s - successfully reset connection attempts of RAN", nodebInfo.RanName) result := h.ranSetupManager.ExecuteSetup(nodebInfo, status)