From f60dfb84b88dbc8d088ac3265ddb259bf14847dc Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Fri, 10 Nov 2023 14:56:46 +0100 Subject: [PATCH] kubeadm: increase qemu disk size With recent addition of NFS test, 2.0GB for the root are not enough for supporting the Cilium and Calico CNI tests. Here's the bin image root size: ``` Filesystem Size Used Avail Use% Mounted on /dev/vda9 2.0G 25M 1.8G 2% / ``` Which leads to this kind of issue: ``` ./qemu_uefi/_kola_temp/qemu-2023-11-09-2319-12/kubeadm.v1.26.5.cilium.base/fb58ff34-536c-45d3-9dcf-84a6e5f97606/journal.txt:2197:Nov 9 23:25:13.213761 kubelet[2155]: E1109 23:25:13.213543 2155 kuberuntime_image.go:53] "Failed to pull image" err="rpc error: code = Unknown desc = failed to pull and unpack image \"quay.io/cilium/cilium@sha256:06ce2b0a0a472e73334a7504ee5c5d8b2e2d7b72ef728ad94e564740dd505be5\": failed to extract layer sha256:e740935483f7a73330abd4cbc9a1d31fc068bd57fe9e037cb819828305ce43ec: write /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/51/fs/usr/bin/cilium: no space left on device: unknown" image="quay.io/cilium/cilium:v1.12.5@sha256:06ce2b0a0a472e73334a7504ee5c5d8b2e2d7b72ef728ad94e564740dd505be5" ``` or ``` cluster.go:125: Error: mkdir /home/core/.config: no space left on device kubeadm.go:297: unable to add helm NFS repo: Process exited with status 1 ``` On OpenStack, Cilium tests takes around 2.1Gb minimum. Signed-off-by: Mathieu Tortuyaux --- kola/tests/kubeadm/kubeadm.go | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/kola/tests/kubeadm/kubeadm.go b/kola/tests/kubeadm/kubeadm.go index daa509705..a91275dcc 100644 --- a/kola/tests/kubeadm/kubeadm.go +++ b/kola/tests/kubeadm/kubeadm.go @@ -28,6 +28,7 @@ import ( "github.com/flatcar/mantle/kola/cluster" "github.com/flatcar/mantle/kola/register" "github.com/flatcar/mantle/kola/tests/etcd" + tutil "github.com/flatcar/mantle/kola/tests/util" "github.com/flatcar/mantle/platform" "github.com/flatcar/mantle/platform/conf" "github.com/flatcar/mantle/util" @@ -422,9 +423,19 @@ func setup(c cluster.TestCluster, params map[string]interface{}) (platform.Machi return nil, fmt.Errorf("unable to render container linux config for master: %w", err) } - master, err := c.NewMachine(conf.ContainerLinuxConfig(masterCfg.String())) - if err != nil { - return nil, fmt.Errorf("unable to create master node: %w", err) + var master, worker platform.Machine + p := c.Platform() + isQemu := p == "qemu" || p == "qemu-unpriv" + if isQemu { + master, err = tutil.NewMachineWithLargeDisk(c, "5G", conf.ContainerLinuxConfig(masterCfg.String())) + if err != nil { + return nil, fmt.Errorf("unable to create master node with large disk: %w", err) + } + } else { + master, err = c.NewMachine(conf.ContainerLinuxConfig(masterCfg.String())) + if err != nil { + return nil, fmt.Errorf("unable to create master node: %w", err) + } } out, err := c.SSH(master, "sudo /home/core/install.sh") @@ -449,9 +460,16 @@ func setup(c cluster.TestCluster, params map[string]interface{}) (platform.Machi return nil, fmt.Errorf("unable to render container linux config for master: %w", err) } - worker, err := c.NewMachine(conf.ContainerLinuxConfig(workerCfg.String())) - if err != nil { - return nil, fmt.Errorf("unable to create worker node: %w", err) + if isQemu { + worker, err = tutil.NewMachineWithLargeDisk(c, "5G", conf.ContainerLinuxConfig(workerCfg.String())) + if err != nil { + return nil, fmt.Errorf("unable to create worker node with large disk: %w", err) + } + } else { + worker, err = c.NewMachine(conf.ContainerLinuxConfig(workerCfg.String())) + if err != nil { + return nil, fmt.Errorf("unable to create worker node: %w", err) + } } out, err = c.SSH(worker, "sudo /home/core/install.sh")