Skip to content

Commit

Permalink
Merge pull request #471 from flatcar/t-lo/portage-stable-docker-24
Browse files Browse the repository at this point in the history
kola: support docker in portage stable, add support for docker 24
  • Loading branch information
t-lo authored Oct 25, 2023
2 parents da11b59 + 60615e2 commit 0279ff3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
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

0 comments on commit 0279ff3

Please sign in to comment.