Skip to content

fix: check for tmpfs when evaluating if userxattr is needed#7772

Merged
dmcgowan merged 1 commit intocontainerd:mainfrom
mathis-m:fix/userxattr_on_tmpfs
Dec 9, 2022
Merged

fix: check for tmpfs when evaluating if userxattr is needed#7772
dmcgowan merged 1 commit intocontainerd:mainfrom
mathis-m:fix/userxattr_on_tmpfs

Conversation

@mathis-m
Copy link
Copy Markdown
Contributor

@mathis-m mathis-m commented Dec 7, 2022

Fixes #7770
It uses statfs to check if the dir provided to NeedsUserXAttr function is on a tempfs.

For detail information see #7770

@k8s-ci-robot
Copy link
Copy Markdown

Hi @mathis-m. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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/test-infra repository.

Comment thread snapshots/overlay/overlayutils/check.go Outdated
Comment thread snapshots/overlay/overlayutils/check.go Outdated
Comment thread snapshots/overlay/overlayutils/check.go Outdated
@mathis-m mathis-m force-pushed the fix/userxattr_on_tmpfs branch from a717171 to 3e145a0 Compare December 7, 2022 17:06
Comment on lines +105 to +106
log.L.WithError(err).Warnf("Could not retrieve statfs for %v", d)
return false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I want to return this error, but this is coming from @AkihiroSuda's comment.

@AkihiroSuda - The errors on https://man7.org/linux/man-pages/man2/statfs.2.html#ERRORS seem pretty rare. Other operations would fail if statfs fails. So is it really make sense to log and essentially ignore the error?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe not pretty rare on fuse

@mathis-m mathis-m force-pushed the fix/userxattr_on_tmpfs branch from 3e145a0 to 5fd98ce Compare December 7, 2022 17:56
@mathis-m mathis-m force-pushed the fix/userxattr_on_tmpfs branch 2 times, most recently from 463823a to b76d30f Compare December 8, 2022 02:36
@mathis-m
Copy link
Copy Markdown
Contributor Author

mathis-m commented Dec 8, 2022

sorry for the force pushes tried to fix the FAIL - does not have a valid DCO

@mathis-m mathis-m force-pushed the fix/userxattr_on_tmpfs branch from b76d30f to 2eabcf7 Compare December 8, 2022 20:17
@dmcgowan dmcgowan merged commit f3368b4 into containerd:main Dec 9, 2022
@AkihiroSuda AkihiroSuda added cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch and removed cherry-pick/1.6.x labels Dec 9, 2022
@mathis-m mathis-m deleted the fix/userxattr_on_tmpfs branch December 9, 2022 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch needs-ok-to-test

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

containerd does not check for backing filesystem when evaluating if userxattr mount option shall be used

5 participants