From 7463baf5af31915a51955aba5c49b899fc26349e Mon Sep 17 00:00:00 2001 From: Adrian Vladu Date: Mon, 2 Dec 2024 16:23:15 +0200 Subject: [PATCH] cgroupv1: kubeadm: do not run tests for version >= 4179 --- kola/tests/kubeadm/kubeadm.go | 14 +++++++++----- kola/tests/misc/cgroup1.go | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/kola/tests/kubeadm/kubeadm.go b/kola/tests/kubeadm/kubeadm.go index 8165ee2f1..0006a4159 100644 --- a/kola/tests/kubeadm/kubeadm.go +++ b/kola/tests/kubeadm/kubeadm.go @@ -17,6 +17,7 @@ import ( "bytes" "encoding/base64" "fmt" + "math" "strings" "text/template" "time" @@ -146,10 +147,12 @@ func init() { testParams["Release"] = version cgroupSuffix := "" - var major int64 = 0 + var majorMinVersion int64 = 0 + var majorEndVersion int64 = math.MaxInt64 if testParams["cgroupv1"].(bool) { cgroupSuffix = ".cgroupv1" - major = 3140 + majorMinVersion = 3140 + majorEndVersion = 4179 } if CNI == "flannel" { @@ -160,8 +163,8 @@ func init() { mmv := (int64)(mmvi.(int)) // Careful, so we don't lower // the min version too much. - if mmv > major { - major = mmv + if mmv > majorMinVersion { + majorMinVersion = mmv } } @@ -174,7 +177,8 @@ func init() { Run: func(c cluster.TestCluster) { kubeadmBaseTest(c, testParams) }, - MinVersion: semver.Version{Major: major}, + MinVersion: semver.Version{Major: majorMinVersion}, + EndVersion: semver.Version{Major: majorEndVersion}, Flags: flags, }) } diff --git a/kola/tests/misc/cgroup1.go b/kola/tests/misc/cgroup1.go index 64be67c03..8a7999b27 100644 --- a/kola/tests/misc/cgroup1.go +++ b/kola/tests/misc/cgroup1.go @@ -38,7 +38,7 @@ func init() { }, Distros: []string{"cl"}, MinVersion: semver.Version{Major: 3033}, - EndVersion: semver.Version{Major: 4152}, + EndVersion: semver.Version{Major: 4179}, // This test is normally not related to the cloud environment Platforms: []string{"qemu", "qemu-unpriv"}, })