-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
rootless #195
rootless #195
Conversation
👍 Currently containerd needs For supporting cgroup, we need to wait for runc to support cgroup v2 with |
Tracker for bringing cgroup2 to OCI is here: opencontainers/runtime-spec#1002 |
@AkihiroSuda I was looking through all the usernetes scripts but somehow I glanced over that you disabled cgroups. Thanks! |
@AkihiroSuda Thanks, that was it. I got it work now. Incredibly magical!!!
|
@ibuildthecloud Does this option fix this problem I got on certain devices ? (see below)
|
@dur3x it could, but it currently doesn't. If running in rootless mode |
d9ef086
to
ee19f4e
Compare
@dur3x Are you running on a rooted android device? It looks like you are running as root and are trying to write to /var which is mounted read-only. You will need to remount /var as read-write, or try using the --data-dir flag to specify a writable directory. It may not matter tho unless your kernel supports user namespaces, if |
[plugins.cri] | ||
stream_server_address = "%NODE%" | ||
stream_server_port = "10010" | ||
` | ||
configUserNSToml = ` |
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.
snapshotter needs to be set to vfs native
except on Ubuntu kernel
os.Setenv(childEnv, "1") | ||
if err := child.Child(pipeFD, os.Args, childOpt); err != nil { | ||
logrus.Fatal("child died", err) | ||
} |
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.
os.Exit?
What storage drivers are supported in rootless mode? Is there any plan for using something like fuse-overlayfs? |
Only |
That is great. fuse-overlayfs should be already usable with CRI-O as the underlying storage library is the same as Podman and Buildah, but I have not tried that yet |
No
But this is another thing and is the same as #192 |
ee19f4e
to
f6ae621
Compare
For the Android environment, is it enough to assume one is running it inside of the UserLand app? Or are you trying to make an app out of this and want to restrict yourself to only the directories natively available? |
For me yes it's enough. My first goal is to be able to run the k3s server (or at least the agent part). |
f6ae621
to
f59ab28
Compare
Let me know if I can be of any help to get this merged |
d616a86
to
a2ff275
Compare
I'm going to merge this although there really are a lot of usability issues. I'll document the issues. |
This is a POC to get k3s working rootless. Using this PR you can run
env "PATH=$(pwd)/bin:$PATH" bash -x ./scripts/dev-server.sh --rootless --data-dir $(pwd)/
And it will start. You need slirp4netns, nsenter, and socat on your path. It will eventually fail when containerd goes to start the pod with
EDIT:
This PR works now, but still going to do more development to make the networking not suck so bad. Right now a new network namespace is created for the process but no ports are bound to the host. So you can't do anything with the launched process unless you do
nsenter -n -t ${PID}
. I'm going to write a controller that watches servicelb ports and binds ports through rootlesskit's API. Will be cool.