Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NCP VPC] Return the Debug message instead of Error message when NLB does not exist. #1230

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ func (nlbHandler *NcpVpcNLBHandler) DeleteNLB(nlbIID irs.IID) (bool, error) {
_, err = nlbHandler.WaitForDelNlb(newNlbIID) // Wait until 'provisioningStatus' is "Terminated"
if err != nil {
newErr := fmt.Errorf("Failed to Wait For Deleting the NLB. [%v]", err.Error())
cblogger.Error(newErr.Error())
LoggingError(callLogInfo, newErr)
cblogger.Debug(newErr.Error())
// return false, newErr // Catuton!! : Incase the status is 'Terminated', fail to get NLB info.
}

Expand Down Expand Up @@ -1273,7 +1272,7 @@ func (nlbHandler *NcpVpcNLBHandler) WaitForDelNlb(nlbIID irs.IID) (bool, error)
nlbStatus, err := nlbHandler.GetNcpNlbStatus(nlbIID)
if err != nil {
newErr := fmt.Errorf("Failed to Get the NLB Provisioning Status : [%v]", err)
cblogger.Error(newErr.Error())
cblogger.Debug(newErr.Error())
return false, newErr
} else if !strings.EqualFold(nlbStatus, "Running") && !strings.EqualFold(nlbStatus, "Terminating") {
return true, nil
Expand All @@ -1300,8 +1299,7 @@ func (nlbHandler *NcpVpcNLBHandler) GetNcpNlbStatus(nlbIID irs.IID) (string, err
ncpNlbInfo, err := nlbHandler.GetNcpNlbInfo(nlbIID)
if err != nil {
newErr := fmt.Errorf("Failed to Get the NCP VPC NLB info!! [%v]", err)
cblogger.Error(newErr.Error())
LoggingError(callLogInfo, newErr)
cblogger.Debug(newErr.Error())
return "", newErr
}

Expand Down Expand Up @@ -1337,9 +1335,8 @@ func (nlbHandler *NcpVpcNLBHandler) GetNcpNlbInfo(nlbIID irs.IID) (*vlb.LoadBala
LoggingInfo(callLogInfo, callLogStart)

if *result.TotalRows < 1 {
newErr := fmt.Errorf("Failed to Get Any NLB Info with the ID from NCP VPC!!")
cblogger.Error(newErr.Error())
LoggingError(callLogInfo, newErr)
newErr := fmt.Errorf("The NLB does not exist on NCP VPC!!")
cblogger.Debug(newErr.Error())
return nil, newErr
} else {
cblogger.Info("Succeeded in Getting the NLB Info.")
Expand Down