mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #45831 from MrHohn/esipp-panic-fix
Automatic merge from submit-queue
Check endpoint subsets length before asserting addresses.
Fix #45824.
Panics were caused by [WaitForEndpointOnNode()](3227f44157/test/e2e/framework/service_util.go (L329)
). Check subsets length ahead to prevent panicing.
/assign @freehan
cc @wojtek-t
**Release note**:
```release-note
NONE
```
This commit is contained in:
commit
3386425475
@ -325,6 +325,10 @@ func (j *ServiceTestJig) WaitForEndpointOnNode(namespace, serviceName, nodeName
|
|||||||
Logf("Get endpoints for service %s/%s failed (%s)", namespace, serviceName, err)
|
Logf("Get endpoints for service %s/%s failed (%s)", namespace, serviceName, err)
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
if len(endpoints.Subsets) == 0 {
|
||||||
|
Logf("Expect endpoints with subsets, got none.")
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
// TODO: Handle multiple endpoints
|
// TODO: Handle multiple endpoints
|
||||||
if len(endpoints.Subsets[0].Addresses) == 0 {
|
if len(endpoints.Subsets[0].Addresses) == 0 {
|
||||||
Logf("Expected Ready endpoints - found none")
|
Logf("Expected Ready endpoints - found none")
|
||||||
|
Loading…
Reference in New Issue
Block a user