Skip to content

Commit 7c51c89

Browse files
Merge pull request #25934 from smarterclayton/node_late
test: Nodes that are deleted should not fire the unready alert
2 parents 36e8a26 + 3076745 commit 7c51c89

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/extended/machines/cluster.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ var _ = g.Describe("[sig-node] Managed cluster", func() {
8383
testDuration := exutil.DurationSinceStartInSeconds().String()
8484

8585
tests := map[string]bool{
86-
// all nodes should be reporting ready throughout the entire run, as long as they are older than 6m
87-
fmt.Sprintf(`(min_over_time((max by (node) (kube_node_status_condition{condition="Ready",status="true"}) and (((max by (node) (kube_node_status_condition))) and (0*max by (node) (kube_node_status_condition offset 6m))))[%s:1s])) < 1`, testDuration): false,
86+
// all nodes should be reporting ready throughout the entire run, as long as they are older than 6m, and they still
87+
// exist in 1m (because prometheus doesn't support negative offsets, we have to shift the entire query left). Since
88+
// the late test might not catch a node not ready at the very end of the run anyway, we don't do anything special
89+
// to shift the test execution later, we just note that there's a scrape_interval+wait_interval gap here of up to
90+
// 1m30s and we can live with ith
91+
fmt.Sprintf(`(min_over_time((max by (node) (kube_node_status_condition{condition="Ready",status="true"} offset 1m) and (((max by (node) (kube_node_status_condition offset 1m))) and (0*max by (node) (kube_node_status_condition offset 7m)) and (0*max by (node) (kube_node_status_condition))))[%s:1s])) < 1`, testDuration): false,
8892
}
8993
err := prometheus.RunQueries(tests, oc, ns, execPod.Name, url, bearerToken)
9094
o.Expect(err).NotTo(o.HaveOccurred())

0 commit comments

Comments
 (0)