Skip to content

Commit

Permalink
tests/docker.go: explicitly configure btrfs driver in daemon.json
Browse files Browse the repository at this point in the history
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
moby/moby#42661

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
  • Loading branch information
t-lo committed Oct 25, 2023
1 parent 3e3cce9 commit 0244678
Showing 1 changed file with 16 additions and 3 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

0 comments on commit 0244678

Please sign in to comment.