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

tests/update: Add test for docker btrfs storage driver #475

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

t-lo
Copy link
Member

@t-lo t-lo commented Oct 30, 2023

This change adds an update test for instances using the docker btrfs storage driver. This storage driver was deprecated in docker release 23 and will be removed in a future release.

Docker 23 and above support backwards compatibility if BTRFS storage exists and is populated.

This test verifies that instances with btrfs storage don't break on update.

@t-lo t-lo requested a review from a team October 30, 2023 15:53
@t-lo t-lo marked this pull request as ready for review October 30, 2023 15:53
t-lo added a commit to flatcar/scripts that referenced this pull request Oct 30, 2023
Temporary commit to use flatcar/mantle#475 for
testing which ships the btrfs backwards compatibility test.

Signed-off-by: Thilo Fromm <[email protected]>
This change adds an update test for instances using the docker btrfs
storage driver. This storage driver was deprecated in docker release 23
and will be removed in a future release.

Docker 23 and above support backwards compatibility if BTRFS storage
exists and is populated.

Signed-off-by: Thilo Fromm <[email protected]>
Comment on lines +66 to +70
// This test verifies preservation of storage driver "btrfs" for docker.
// Docker releases before v23 defaulted to btrfs if the docker can only run if the update payload to test is given.
// The image passed must also be a release lower than or equal to 3760.0.0
// because newer versions ship docker 24.
EndVersion: semver.Version{Major: 3760},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should have a separate test that boots the old release (but new enough to be with docker 24) with a config that forces btrfs storage driver, pulls an image and creates a container, so the storage is used. Then drops the config and updates the OS to see if btrfs driver is still used. Similar to this test, but would make sure nothing breaks after a sequence of [old OS with old docker using btrfs storage] -> [newer OS with new docker using inherited btrfs storage] -> [shiny new OS with new docker still using the inherited btrfs storage] (your test checks the first transition, another would test the second transition). Such test would probably need to be minimum 3760.0.0. Or maybe we could drop the EndVersion and make this test work regardless of the docker version.

Copy link
Member Author

@t-lo t-lo Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think an intermediate update to Docker 24 would make any difference since I don't think docker stores any configuration data, but instead auto-detects whether to use btrfs. The "newest" Docker would need to auto-detect the need to use the btrfs storage driver either way, no matter if it was upgraded from docker 20 or docker 24.

@t-lo t-lo merged commit 99dccdb into flatcar-master Nov 1, 2023
2 checks passed
@t-lo t-lo deleted the t-lo/add-docker-btrfs-update-compat-test branch November 1, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants