Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kola: support docker in portage stable, add support for docker 24 #471

Merged
merged 3 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions kola/tests/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -158,7 +171,7 @@ systemd:
[Install]
WantedBy=multi-user.target
- name: var-lib-docker.mount
enable: true
enabled: true
contents: |
[Unit]
Before=docker.service
Expand Down
7 changes: 4 additions & 3 deletions kola/tests/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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" {
Expand Down
6 changes: 5 additions & 1 deletion kola/tests/sysext/sysext.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(&register.Test{
Expand Down Expand Up @@ -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))
Expand Down
Loading