mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
Merge pull request #50931 from jrperritt/fix-pool-panic
Automatic merge from submit-queue cloudprovider/openstack bug fix: don't try to append pool id if pool doesn't exist **What this PR does / why we need it**: This fixes a bug in the OpenStack cloud provider that could cause a panic. Consider what will happen in the current `LbaasV2.EnsureLoadBalancerDeleted` code if `nil, ErrNotFound` is returned by `getPoolByListenerID`.
This commit is contained in:
commit
6bb928a3df
@ -1144,10 +1144,12 @@ func (lbaas *LbaasV2) EnsureLoadBalancerDeleted(clusterName string, service *v1.
|
||||
if err != nil && err != ErrNotFound {
|
||||
return fmt.Errorf("Error getting pool for listener %s: %v", listener.ID, err)
|
||||
}
|
||||
poolIDs = append(poolIDs, pool.ID)
|
||||
// If create-monitor of cloud-config is false, pool has not monitor.
|
||||
if pool.MonitorID != "" {
|
||||
monitorIDs = append(monitorIDs, pool.MonitorID)
|
||||
if pool != nil {
|
||||
poolIDs = append(poolIDs, pool.ID)
|
||||
// If create-monitor of cloud-config is false, pool has not monitor.
|
||||
if pool.MonitorID != "" {
|
||||
monitorIDs = append(monitorIDs, pool.MonitorID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user