mirror of https://github.com/k3s-io/k3s
Retry node pool deletion in autoscaling tests.
This will deflake autoscaling e2e tests on gke. When there is already an operation running on the cluster, the node pool deletion will fail. This will in turn make other tests that add extra node pool fail.pull/8/head
parent
e57af2b354
commit
b0f44e3bee
|
@ -1304,11 +1304,18 @@ func deleteNodePool(name string) {
|
||||||
glog.Infof("Deleting node pool %s", name)
|
glog.Infof("Deleting node pool %s", name)
|
||||||
args := []string{"container", "node-pools", "delete", name, "--quiet",
|
args := []string{"container", "node-pools", "delete", name, "--quiet",
|
||||||
"--cluster=" + framework.TestContext.CloudConfig.Cluster}
|
"--cluster=" + framework.TestContext.CloudConfig.Cluster}
|
||||||
output, err := execCmd(getGcloudCommand(args)...).CombinedOutput()
|
err := wait.ExponentialBackoff(
|
||||||
if err != nil {
|
wait.Backoff{Duration: 1 * time.Minute, Factor: float64(3), Steps: 3},
|
||||||
glog.Infof("Error: %v", err)
|
func() (bool, error) {
|
||||||
}
|
output, err := execCmd(getGcloudCommand(args)...).CombinedOutput()
|
||||||
glog.Infof("Node-pool deletion output: %s", output)
|
if err != nil {
|
||||||
|
glog.Warningf("Error deleting nodegroup - error:%v, output: %s", err, output)
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
glog.Infof("Node-pool deletion output: %s", output)
|
||||||
|
return true, nil
|
||||||
|
})
|
||||||
|
framework.ExpectNoError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getPoolNodes(f *framework.Framework, poolName string) []*v1.Node {
|
func getPoolNodes(f *framework.Framework, poolName string) []*v1.Node {
|
||||||
|
|
Loading…
Reference in New Issue