Skip to content

Commit

Permalink
kubeadm: increase qemu disk size
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tormath1 committed Nov 10, 2023
1 parent 94aca3a commit f60dfb8
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions kola/tests/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit f60dfb8

Please sign in to comment.