diff --git a/Makefile b/Makefile index e06b22a65a..2f4f35b0af 100644 --- a/Makefile +++ b/Makefile @@ -497,6 +497,9 @@ test-cyclonus: kind: kind create cluster --config ./test/kind/kind.yaml +version: ## prints the version + @echo $(VERSION) + $(TOOLS_DIR)/go.mod: cd $(TOOLS_DIR); go mod init && go mod tidy diff --git a/cns/cnireconciler/version.go b/cns/cnireconciler/version.go index 17b0d1124e..91a4667164 100644 --- a/cns/cnireconciler/version.go +++ b/cns/cnireconciler/version.go @@ -8,7 +8,9 @@ import ( "k8s.io/utils/exec" ) -const lastCNIWithoutDumpStateVer = "1.4.1" +// >= 1.4.7 is required due to a bug in CNI when the statefile is empty +// even though the command existed since 1.4.2. +const lastCNIWithoutDumpStateVer = "1.4.6" // IsDumpStateVer checks if the CNI executable is a version that // has the dump state command required to initialize CNS from CNI diff --git a/cns/cnireconciler/version_test.go b/cns/cnireconciler/version_test.go index fb64e2585d..eafe75b88a 100644 --- a/cns/cnireconciler/version_test.go +++ b/cns/cnireconciler/version_test.go @@ -38,13 +38,13 @@ func TestIsDumpStateVer(t *testing.T) { }, { name: "good ver", - exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.2`), + exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.7`), want: true, wantErr: false, }, { name: "good dirty ver", - exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.2-7-g7b97e1eb`), + exec: newCNIVersionFakeExec(`Azure CNI Version v1.4.7-7-g7b97e1eb`), want: true, wantErr: false, },