Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions test/extended/util/compat_otp/clusterinfra/machine_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ func WaitForNodesReady(oc *exutil.CLI, machineSetName string) {
machineNumber := GetMachineSetReplicas(oc, machineSetName)
if machineNumber >= 1 {
e2e.Logf("Wait nodes ready then check nodes haven't uninitialized taints...")
err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 60*time.Second, false, func(cxt context.Context) (bool, error) {
err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 180*time.Second, false, func(cxt context.Context) (bool, error) {
defer g.GinkgoRecover()
for _, nodeName := range GetNodeNamesFromMachineSet(oc, machineSetName) {
readyStatus, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("node", nodeName, "-o=jsonpath={.status.conditions[?(@.type==\"Ready\")].status}").Output()
// If node NotFound,skip check this node
Expand All @@ -310,12 +311,15 @@ func WaitForNodesReady(oc *exutil.CLI, machineSetName string) {
}
taints, err := oc.AsAdmin().WithoutNamespace().Run("get").Args("node", nodeName, "-o=jsonpath={.spec.taints}").Output()
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(taints).ShouldNot(o.ContainSubstring("uninitialized"))
if strings.Contains(taints, "uninitialized") {
e2e.Logf("Node %s has uninitialized taint %s, retrying...", nodeName, taints)
return false, nil
}
}
e2e.Logf("All nodes are ready and haven't uninitialized taints ...")
return true, nil
})
compat_otp.AssertWaitPollNoErr(err, "some nodes are not ready in 1 minutes")
compat_otp.AssertWaitPollNoErr(err, "some nodes are not ready in 3 minutes")
}
}

Expand Down