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

runtime: Implement mount option filtering #31

Open
r10r opened this issue Feb 11, 2021 · 3 comments
Open

runtime: Implement mount option filtering #31

r10r opened this issue Feb 11, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@r10r
Copy link
Contributor

r10r commented Feb 11, 2021

liblxc fails to mount filesystems if unsupported mount options are passed to lxc.mount.entry.
It does however support the option optional to continue with container startup even if a mountpoint fails.
See man lxc.container.conf

crio-lxc should support filtering of mount options, to handle unsupported mount options gracefully.

@r10r
Copy link
Contributor Author

r10r commented Feb 11, 2021

The mount system call does not support to ignore unsupported mount options.
The mount binary itself implements the option -s which is only partially implemented See man 8 mount

-s     Tolerate  sloppy  mount  options  rather  than  failing.  
 This will ignore mount options not supported by a filesystem type.  
Not all filesystems support this option.  
Currently it's supported by the  mount.nfs mount helper only.

Currently almost all mount options are passed through to liblxc.
But in certain configurations drachenfels-de/lxcri-defork#13 unsupported mount options are passed from crio-o.

@r10r r10r transferred this issue from another repository Mar 24, 2021
@r10r
Copy link
Contributor Author

r10r commented Mar 24, 2021

containers/storage does check for supported mount options.
It simply calls mount with the options to check and if it fails the option is not supported.

@r10r r10r transferred this issue from another repository Apr 8, 2021
@r10r
Copy link
Contributor Author

r10r commented Apr 21, 2021

Mount options are now filtered to ignore unsupported options, but that's not a final solution.

lxcri/mount.go

Line 31 in cbc79e1

func filterMountOptions(rt *Runtime, fs string, opts []string) []string {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

1 participant