-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
mountOpts: dont do early failure while getting DefaultMountOpts
#12681
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold till discussion Edit: Marking as draft till discussion. |
pkg/util/mountOpts.go
Outdated
@@ -136,7 +137,8 @@ func ProcessOptions(options []string, isTmpfs bool, sourcePath string) ([]string | |||
} | |||
defaults, err := getDefaultMountOptions(sourcePath) | |||
if err != nil { | |||
return nil, err | |||
logrus.Warnf("Unable to get default mount options: %v", err) | |||
logrus.Warnf("If not specified podman will fallback to default [noexec=false, nosuid=true, nodev=true] for mount source: %s", sourcePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Can we get the list of defaults, rather then hard coding them into the warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I agree. Getting it from configured defaults.
OCI `hooks` can still do magic to source mount paths, so if they are not accessible do not fail instead for getting `DefaultMountOpts` instead `warn` and fallback to configured `defaults`. If anything bad happens let OCI runtime perform failure. Signed-off-by: Aditya Rajan <[email protected]>
ff6dd1c
to
a0f9cc6
Compare
Approach LGTM, but I do doubt this is going to be enough to handle the hooks use-case, I think we have checks on the source directory in other places as well. |
@mheon I have tried following PR it reaches I think we should run |
Upstream issue is closed with discussion that |
OCI
hooks
can still do magic to source mount paths, so if they are notaccessible do not fail for getting
DefaultMountOpts
insteadwarn
and fallback to programmed
defaults
.If anything bad happens let OCI runtime perform failure.
Closes: #12650