-
Notifications
You must be signed in to change notification settings - Fork 3k
WIP: Add support for pinned namespaces #5210
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
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: saschagrunert The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
b0273c2 to
542b54a
Compare
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.
Might clash with #5209
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. We want to get rid of direct dependencies on docker/docker.
cmd/podman/pod_create.go
Outdated
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.
for now, the "instead of using an infra container" isn't quite correct. I would want to update the description once we can actually drop the infra container
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.
oh I see that's the eventual intention of this PR, nevermind 😄
vrothberg
left a comment
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.
Really cool idea!
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.
Can we use the stdlib instead?
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.
Thinking about it: couldn't we do everything in a go package with C bindings? github.com/containers/libpod/pkg/pinns? That would be faster, easier to maintain (as most folks don't speak rust unfortunately), and there would be no need to package a new tool for all distributions.
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.
cgo isn't a great option, because the go runtime and locking threads is funky. We thought about this approach, but ultimately decided exec'ing the binary was a more guarenteed way of preventing an interrupt from changing the context too much. here's more info https://github.com/containernetworking/plugins/tree/master/pkg/ns
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.
That's an omnipresent problem in go but locking the thread has proven to work. I didn't yet buy the idea of adding another dependency on top.
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.
Just saw https://github.com/cri-o/cri-o/tree/master/pinns now. Easier than Rust. I try to catch up with the discussion in the CRI-O PR.
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.
Don’t take my Rust stuff too serious, we had a hackweek and I’m totally open to stick to the C version if that’s the preferred one. 🙂
I was at the same point in thinking to unshare+pin as subcommand rather than having another binary, but now I see totally the arguments against something like that. 🤔
Which kinds of namespaces do we want to unshare beside NET, IPC and UTS? What about PID (dedicated feature called “pns“ in k8s), CGROUP and the USER (permissions) ns?
|
☔ The latest upstream changes (presumably #5203) made this pull request unmergeable. Please resolve the merge conflicts. |
|
I think we need to talk about cgroup... My initial impression is yes, though. |
the conversation of a pod level cgroupns hasn't been resolved in k8s, it's kind of been deferred until cgroupsv2 comes along more. As such, I could see it being useful to wire up the capability in podman so we don't have to add it later and fuss with different versions of pinns |
|
This seems to be a containers.conf decision, so Distros/Administrators can make the decision. |
Signed-off-by: Sascha Grunert <[email protected]>
Signed-off-by: Sascha Grunert <[email protected]>
8cc4dfb to
61ae08c
Compare
I agree. Do we want to put Maybe @vrothberg can support here as well? Are there any open discussion points regarding |
I would love to prevent us from having (yet) another dependency and project. They need to be setup, maintained and packaged; all causing additional work for upstream and downstream. Hope dies last :) Why can't we have a go package with C bindings doing the work? @haircommander mentioned the common issues regarding cgo, thread locking in go etc. but is there a concrete technical reason/blocker not to go with go? If there's a clear blocker, then I stop nagging :^)
|
|
☔ The latest upstream changes (presumably #5225) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@saschagrunert: PR needs rebase. DetailsInstructions 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. |
|
A friendly reminder that this PR had no activity for 30 days. |
|
@saschagrunert @haircommander Any movement on this? |
|
Closing this for now since I think main questions like how we want to distribute pinns are not solved yet. |
The idea is to pin the namespaces to a dedicated on-disk location by not having the need for a pause container any more (analogous to the CRI-O implementation).
This is still in WIP and would need documentation, testing and some pre-defined design decisions.
Demo
What seems to work right now, when a
pinnsexectuable (from CRI-O pinns or pinns.rs) is in$PATH.Namespace life-cycle handling
Containers in pods
Still TODO