mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #47005 from MaciekPytel/add_e2e_setup_time
Automatic merge from submit-queue (batch tested with PRs 46977, 47005, 47018, 47061, 46809) Fix for cluster-autoscaler e2e failures This may help with cluster-autoscaler e2e failing in setup if the tests are run before all machines in mig get fully ready.
This commit is contained in:
commit
e7bb6af46c
@ -79,14 +79,6 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
|
|||||||
c = f.ClientSet
|
c = f.ClientSet
|
||||||
framework.SkipUnlessProviderIs("gce", "gke")
|
framework.SkipUnlessProviderIs("gce", "gke")
|
||||||
|
|
||||||
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
|
||||||
nodeCount = len(nodes.Items)
|
|
||||||
Expect(nodeCount).NotTo(BeZero())
|
|
||||||
cpu := nodes.Items[0].Status.Capacity[v1.ResourceCPU]
|
|
||||||
mem := nodes.Items[0].Status.Capacity[v1.ResourceMemory]
|
|
||||||
coresPerNode = int((&cpu).MilliValue() / 1000)
|
|
||||||
memCapacityMb = int((&mem).Value() / 1024 / 1024)
|
|
||||||
|
|
||||||
originalSizes = make(map[string]int)
|
originalSizes = make(map[string]int)
|
||||||
sum := 0
|
sum := 0
|
||||||
for _, mig := range strings.Split(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") {
|
for _, mig := range strings.Split(framework.TestContext.CloudConfig.NodeInstanceGroup, ",") {
|
||||||
@ -96,6 +88,17 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
|
|||||||
originalSizes[mig] = size
|
originalSizes[mig] = size
|
||||||
sum += size
|
sum += size
|
||||||
}
|
}
|
||||||
|
// Give instances time to spin up
|
||||||
|
framework.ExpectNoError(framework.WaitForClusterSize(c, sum, scaleUpTimeout))
|
||||||
|
|
||||||
|
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
||||||
|
nodeCount = len(nodes.Items)
|
||||||
|
Expect(nodeCount).NotTo(BeZero())
|
||||||
|
cpu := nodes.Items[0].Status.Capacity[v1.ResourceCPU]
|
||||||
|
mem := nodes.Items[0].Status.Capacity[v1.ResourceMemory]
|
||||||
|
coresPerNode = int((&cpu).MilliValue() / 1000)
|
||||||
|
memCapacityMb = int((&mem).Value() / 1024 / 1024)
|
||||||
|
|
||||||
Expect(nodeCount).Should(Equal(sum))
|
Expect(nodeCount).Should(Equal(sum))
|
||||||
|
|
||||||
if framework.ProviderIs("gke") {
|
if framework.ProviderIs("gke") {
|
||||||
|
Loading…
Reference in New Issue
Block a user