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 {
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)