-
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
Cleanup handling of podman mount/unmount #7085
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan 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 |
Splitting this PR away from the bigger podmain image mount PR. Hopefully this will help me figure out what is causing the podman tag/untag issues, that are preventing that PR from merging. |
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.
Code LGTM but I'd love to have some tests for the "unknown format" case and when mounting outside a user namespace.
@@ -210,6 +210,13 @@ can_use_shortcut () | |||
ret = false; | |||
break; | |||
} | |||
|
|||
if (strcmp (argv[argc], "container") == 0 && | |||
strcmp (argv[argc+1], "mount") == 0) |
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.
index out of range
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.
Fixed
5592fd1
to
60f4c98
Compare
@@ -1 +0,0 @@ | |||
.so man1/podman-umount.1 |
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.
Was this intentionally deleted?
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.
Yes, It is actually renamed. podman-umount.1 now links to man1/podman-unmount.1
One question, and tests as @vrothberg mentioned would be good. Otherwise LGTM |
Tests added, but I could not get them to run locally. Will see what happens here. |
6598cab
to
cc57807
Compare
cmd/podman/registry/config.go
Outdated
@@ -16,6 +16,7 @@ import ( | |||
|
|||
const ( | |||
ParentNSRequired = "ParentNSRequired" | |||
UserNSRequired = "UserNSRequired" |
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.
Could this be renamed? Maybe "RootRequired"?
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.
I don't think that is helpful. How about UnshareUserNSRequired Or UnshareNSRequired
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.
UnshareNSRequired SGTM
LGTM once the UserNSRequired field is renamed |
We should default to the user name unmount rather then the internal name of umount. Also User namespace was not being handled correctly. We want to inform the user that if they do a mount when in rootless mode that they have to be first in the podman unshare state. Signed-off-by: Daniel J Walsh <[email protected]>
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.
/lgtm
/hold
Restarted flakes |
/hold cancel |
We should default to the user name unmount rather then the internal
name of umount.
Also User namespace was not being handled correctly. We want to inform
the user that if they do a mount when in rootless mode that they have
to be first in the podman unshare state.
Signed-off-by: Daniel J Walsh [email protected]