From 3e3cce9c9ddefa8296a99d9d19c16905a18706ea Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Wed, 25 Oct 2023 10:00:29 +0200 Subject: [PATCH 1/3] tests/sysext.go: ingest bakery fix for docker >=23 Signed-off-by: Thilo Fromm --- kola/tests/sysext/sysext.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kola/tests/sysext/sysext.go b/kola/tests/sysext/sysext.go index ab6a4b8c2..bc41f07d6 100644 --- a/kola/tests/sysext/sysext.go +++ b/kola/tests/sysext/sysext.go @@ -276,6 +276,10 @@ storage: target: /dev/null hard: false overwrite: true + - path: /etc/extensions/containerd-flatcar.raw + target: /dev/null + hard: false + overwrite: true `), }) register.Register(®ister.Test{ @@ -333,7 +337,7 @@ func checkSysextCustomDocker(c cluster.TestCluster) { // First assert that Docker doesn't work because Torcx is disabled _ = c.MustSSH(c.Machines()[0], cmdNotWorking) // We build a custom sysext image locally because we don't host them somewhere yet - _ = c.MustSSH(c.Machines()[0], `git clone https://github.com/flatcar/sysext-bakery.git && git -C sysext-bakery checkout e68d2fe25c8412f4774477d1d75c40f615145c46`) + _ = c.MustSSH(c.Machines()[0], `git clone https://github.com/flatcar/sysext-bakery.git && git -C sysext-bakery checkout 9850ffd5b2353f45a9b3bf4fb84f8138a149e3e7`) // Flatcar has no mksquashfs and btrfs is missing a bugfix but at least ext4 works // The first test is for a fixed Docker version, which with the time will get old and older but is still expected to work because users may also "freeze" their Docker version this way _ = c.MustSSH(c.Machines()[0], fmt.Sprintf(`ARCH=%[1]s ONLY_DOCKER=1 FORMAT=ext4 sysext-bakery/create_docker_sysext.sh 20.10.21 docker && ARCH=%[1]s ONLY_CONTAINERD=1 FORMAT=ext4 sysext-bakery/create_docker_sysext.sh 20.10.21 containerd && sudo mv docker.raw containerd.raw /etc/extensions/`, arch)) From 02446782cba520e7e694dd3a10dc9a2cfe9edb7f Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Wed, 25 Oct 2023 13:23:07 +0200 Subject: [PATCH 2/3] tests/docker.go: explicitly configure btrfs driver in daemon.json This change adds an explicit brtfs driver request in /etc/docker/daemon.json to un-break the docker btrfs test for docker 23 and above. The explicit storage driver configuration does not break docker 20 and older; it works fine if btrfs storage is provided (which it is in the test). Starting with docker 23, overlay2 is the default also for btrfs filesystems, and the btrfs driver is opt-in. See https://docs.docker.com/engine/release-notes/23.0/#bug-fixes-and-enhancements-6 and https://github.com/moby/moby/pull/42661 Signed-off-by: Thilo Fromm --- kola/tests/docker/docker.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/kola/tests/docker/docker.go b/kola/tests/docker/docker.go index 254fffbbb..3eb503e95 100644 --- a/kola/tests/docker/docker.go +++ b/kola/tests/docker/docker.go @@ -142,11 +142,24 @@ passwd: // This test is normally not related to the cloud environment Platforms: []string{"qemu", "qemu-unpriv"}, // Note: copied verbatim from https://github.com/coreos/docs/blob/master/os/mounting-storage.md#creating-and-mounting-a-btrfs-volume-file - UserData: conf.ContainerLinuxConfig(` + // Added explicit btrfs driver selection because overlay2 is the default for btrfs FS in docker 23 and above + UserData: conf.Butane(` +variant: flatcar +version: 1.0.0 + +storage: + files: + - path: /etc/docker/daemon.json + contents: + inline: | + { + "storage-driver": "btrfs" + } + systemd: units: - name: format-var-lib-docker.service - enable: true + enabled: true contents: | [Unit] Before=docker.service var-lib-docker.mount @@ -158,7 +171,7 @@ systemd: [Install] WantedBy=multi-user.target - name: var-lib-docker.mount - enable: true + enabled: true contents: | [Unit] Before=docker.service From 60615e2a826e6f220db462f08181f59e26b89b34 Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Wed, 25 Oct 2023 14:58:15 +0200 Subject: [PATCH 3/3] tests/kubeadm.go: increase calico wait times to 3min Signed-off-by: Thilo Fromm --- kola/tests/kubeadm/kubeadm.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kola/tests/kubeadm/kubeadm.go b/kola/tests/kubeadm/kubeadm.go index e2aa0e9b2..3f08a6848 100644 --- a/kola/tests/kubeadm/kubeadm.go +++ b/kola/tests/kubeadm/kubeadm.go @@ -286,8 +286,8 @@ func kubeadmBaseTest(c cluster.TestCluster, params map[string]interface{}) { } c.Run("node readiness", func(c cluster.TestCluster) { - // we let some times to the cluster to be fully booted - if err := util.Retry(10, 10*time.Second, func() error { + // Wait up to 3 min (36*5 = 180s) for nginx. The test can be flaky on overcommitted platforms. + if err := util.Retry(36, 5*time.Second, func() error { // notice the extra space before "Ready", it's to not catch // "NotReady" nodes out := c.MustSSH(kubectl, "/opt/bin/kubectl get nodes | grep \" Ready\"| wc -l") @@ -307,7 +307,8 @@ func kubeadmBaseTest(c cluster.TestCluster, params map[string]interface{}) { c.Fatalf("unable to deploy nginx: %v", err) } - if err := util.Retry(10, 10*time.Second, func() error { + // Wait up to 3 min (36*5 = 180s) for nginx. The test can be flaky on overcommitted platforms. + if err := util.Retry(36, 5*time.Second, func() error { out := c.MustSSH(kubectl, "/opt/bin/kubectl get deployments -o json | jq '.items | .[] | .status.readyReplicas'") readyCnt := string(out) if readyCnt != "1" {