Support both styles of volatile mount option#13256
Conversation
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>
There was a problem hiding this comment.
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=volatileas equivalent tovolatilewhen deciding whether to add the volatile option for image-volume overlay mounts. - Remove
fsync=volatilefrom overlay mounts inRemoveVolatileOption, just likevolatile. - Update integration/unit tests to accept either
volatileorfsync=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.
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 |
|
/cherry-pick release/2.2 |
|
@chrishenzie: #13256 failed to apply on top of branch "release/2.0": DetailsIn response to this:
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. |
|
@chrishenzie: #13256 failed to apply on top of branch "release/2.1": DetailsIn response to this:
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. |
|
@chrishenzie: #13256 failed to apply on top of branch "release/2.2": DetailsIn response to this:
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. |
Kernel 6.12.80+ returns
fsync=volatileinstead of justvolatilein mount options, which breaks containerd's exact string matching checks.Fixes this issue by adding support for
fsync=volatilein addition to the existingvolatilecheck inRemoveVolatileOptionandaddVolatileOptionOnImageVolumeMount.Fixes: #13250
Assisted-by: Antigravity