Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
zarvd committed Dec 22, 2023
1 parent 5c2fbd5 commit 046915e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/provider/azure_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"net"
"net/netip"
"reflect"
"runtime/debug"
"sort"
"strings"
"unicode"
Expand Down Expand Up @@ -2826,6 +2827,13 @@ func (az *Cloud) reconcileSecurityGroup(
WithValues("delete-lb", !wantLb)
logger.V(2).Info("Starting")

defer func() {
if r := recover(); r != nil {
stacktrace := debug.Stack()
logger.Error(fmt.Errorf("reconcileSecurityGroup panic: %v", r), "Panic", "stacktrace", string(stacktrace))
}
}()

if wantLb && len(lbIPs) == 0 {
return nil, fmt.Errorf("no load balancer IP for setting up security rules for service %s", service.Name)
}
Expand Down

0 comments on commit 046915e

Please sign in to comment.