Skip to content

Commit

Permalink
[occm]: exit on unreachable loadbalancer endpoint (#2706)
Browse files Browse the repository at this point in the history
  • Loading branch information
kayrus authored Nov 13, 2024
1 parent 733195a commit 16c269a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/openstack/openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,13 @@ func (os *OpenStack) LoadBalancer() (cloudprovider.LoadBalancer, bool) {

network, err := client.NewNetworkV2(os.provider, os.epOpts)
if err != nil {
klog.Errorf("Failed to create an OpenStack Network client: %v", err)
klog.Fatalf("Failed to create an OpenStack Network client: %v", err)
return nil, false
}

lb, err := client.NewLoadBalancerV2(os.provider, os.epOpts)
if err != nil {
klog.Errorf("Failed to create an OpenStack LoadBalancer client: %v", err)
klog.Fatalf("Failed to create an OpenStack LoadBalancer client: %v", err)
return nil, false
}

Expand All @@ -369,7 +369,7 @@ func (os *OpenStack) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
// Currently kubernetes OpenStack cloud provider just support LBaaS v2.
lbVersion := os.lbOpts.LBVersion
if lbVersion != "" && lbVersion != "v2" {
klog.Warningf("Config error: currently only support LBaaS v2, unrecognised lb-version \"%v\"", lbVersion)
klog.Fatalf("Config error: currently only support LBaaS v2, unrecognised lb-version \"%v\"", lbVersion)
return nil, false
}

Expand Down

0 comments on commit 16c269a

Please sign in to comment.