Skip to content

Support both styles of volatile mount option#13256

Merged
fuweid merged 1 commit into
containerd:mainfrom
chrishenzie:fix-volatile-mount-check
Apr 22, 2026
Merged

Support both styles of volatile mount option#13256
fuweid merged 1 commit into
containerd:mainfrom
chrishenzie:fix-volatile-mount-check

Conversation

@chrishenzie

@chrishenzie chrishenzie commented Apr 20, 2026

Copy link
Copy Markdown
Member

Kernel 6.12.80+ returns fsync=volatile instead of just volatile in mount options, which breaks containerd's exact string matching checks.

Fixes this issue by adding support for fsync=volatile in addition to the existing volatile check in RemoveVolatileOption and addVolatileOptionOnImageVolumeMount.

Fixes: #13250

Assisted-by: Antigravity

Kernel 6.12.80+ returns 'fsync=volatile' instead of just 'volatile'
in mount options, which breaks containerd's exact string matching
checks.

Fixes this issue by adding support for 'fsync=volatile' in addition
to the existing 'volatile' check in RemoveVolatileOption and
addVolatileOptionOnImageVolumeMount.

Assisted-by: Antigravity
Signed-off-by: Chris Henzie <chrishenzie@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates containerd’s overlayfs “volatile” mount-option handling to tolerate newer kernels (6.12.80+) that report the option as fsync=volatile instead of volatile, preventing failures caused by exact string matching.

Changes:

  • Treat fsync=volatile as equivalent to volatile when deciding whether to add the volatile option for image-volume overlay mounts.
  • Remove fsync=volatile from overlay mounts in RemoveVolatileOption, just like volatile.
  • Update integration/unit tests to accept either volatile or fsync=volatile.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/cri/server/container_image_mount_linux.go Avoids adding volatile when fsync=volatile is already present on overlay mounts.
core/mount/temp.go Extends RemoveVolatileOption to remove fsync=volatile as well as volatile.
core/mount/mount_test.go Adds unit coverage ensuring fsync=volatile is removed only from overlay mounts.
integration/image_volume_linux_test.go Makes the volatile mount option assertion compatible with kernels reporting fsync=volatile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chrishenzie chrishenzie marked this pull request as ready for review April 20, 2026 21:07
@dosubot dosubot Bot added the kind/bug label Apr 20, 2026
@samuelkarp

samuelkarp commented Apr 21, 2026

Copy link
Copy Markdown
Member

Kernel 6.12.80+ returns fsync=volatile instead of just volatile in mount options, which breaks containerd's exact string matching checks.

I think we only read the value from the kernel in test code, not in actual code. Other use of volatile is providing that as an option when we make the mount syscall, which is not broken.

Edit: Since the option can come from the snapshotter and we are not in control of proxy snapshotters, it is possible for us to encounter fsync=volatile.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Apr 21, 2026
@fuweid fuweid added this pull request to the merge queue Apr 21, 2026
Merged via the queue into containerd:main with commit 84ac5de Apr 22, 2026
58 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Apr 22, 2026
@chrishenzie chrishenzie deleted the fix-volatile-mount-check branch April 23, 2026 15:33
@chrishenzie

Copy link
Copy Markdown
Member Author

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/2.0

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@chrishenzie: #13256 failed to apply on top of branch "release/2.0":

Applying: Support both styles of volatile mount option
Using index info to reconstruct a base tree...
A	integration/image_volume_linux_test.go
A	internal/cri/server/container_image_mount_linux.go
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): internal/cri/server/container_image_mount_linux.go deleted in HEAD and modified in Support both styles of volatile mount option. Version Support both styles of volatile mount option of internal/cri/server/container_image_mount_linux.go left in tree.
CONFLICT (modify/delete): integration/image_volume_linux_test.go deleted in HEAD and modified in Support both styles of volatile mount option. Version Support both styles of volatile mount option of integration/image_volume_linux_test.go left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Support both styles of volatile mount option

Details

In response to this:

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@chrishenzie: #13256 failed to apply on top of branch "release/2.1":

Applying: Support both styles of volatile mount option
Using index info to reconstruct a base tree...
M	integration/image_volume_linux_test.go
M	internal/cri/server/container_image_mount_linux.go
Falling back to patching base and 3-way merge...
Auto-merging internal/cri/server/container_image_mount_linux.go
CONFLICT (content): Merge conflict in internal/cri/server/container_image_mount_linux.go
Auto-merging integration/image_volume_linux_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Support both styles of volatile mount option

Details

In response to this:

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@chrishenzie: #13256 failed to apply on top of branch "release/2.2":

Applying: Support both styles of volatile mount option
Using index info to reconstruct a base tree...
M	internal/cri/server/container_image_mount_linux.go
Falling back to patching base and 3-way merge...
Auto-merging internal/cri/server/container_image_mount_linux.go
CONFLICT (content): Merge conflict in internal/cri/server/container_image_mount_linux.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Support both styles of volatile mount option

Details

In response to this:

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@samuelkarp samuelkarp added cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch labels Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch kind/bug size/M

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

containerd test case with volatile mounts failing

6 participants