-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Docker] (Kubeflow integration) Only UID=1000 has the write access of /home/ray in Ray images #30959
Comments
@DmitriGekhtman can you help tag the owner of Dockerfiles? I cannot find the owners of |
The Dockerfiles are arcane work of @ijrsvt :D |
@kevin85421 What exactly do you want to change with the base Docker images? |
Thank @ijrsvt for your reply! As mentioned in the PR description, we want to open the write access of |
Ahh! Totally missed that. Can we change the permissions to: |
"During the creation of a project or namespace, OpenShift assigns a User ID (UID) range, a supplemental group ID (GID) range, and unique SELinux MCS labels to the project or namespace. ... When a Pod is deployed into the namespace, by default, OpenShift will use the first UID and first GID from this range to run the Pod. Any attempt by a Pod definition to specify a UID outside the assigned range will fail and requires special privileges." (A Guide to OpenShift and UIDs, RedHat) 775 will not work because we cannot assume OpenShift will choose RAY_GID (i.e. 100) as its GID. I think we should use |
Amazing guys. i was busy with personal stuff but i will catch up again. write me on slack if you need help |
Openshift uses GID 0 by default so definitely not 100. Yes 777 is the right way to support all Kubernetes distributions. Is there anything else preventing you from moving forward? |
Gentle ping @ijrsvt. Thank you! |
@kevin85421 Yeah, I think we can modify it to be |
777 is too open for ssh, so #31563 may be reverted. See #32025 for more details. Any ideas for other solutions? cc @juliusvonkohout @ijrsvt |
We decided to integrate Kubeflow without this update. (kubeflow/manifests#2383) |
Description
This issue is a part of the integration between KubeRay and Kubeflow. See ray-project/kuberay#750 (comment) for some context.
In KinD (a Kubernetes distribution) cluster, when we use the command
kubectl exec ..
to log in to a ray Pod, the UID will be the same as $RAY_UID (i.e. 1000) in base-deps/Dockerfile.ray/docker/base-deps/Dockerfile
Lines 16 to 27 in b15d8f3
For OpenShift (a Kubernetes distribution), a random non-root UID will be used when we log in to a ray Pod. However, only
UID=1000
has the write access of/home/ray
. Therefore, the error message ofPermission denied
will be reported. As follows, onlyray
(UID = 1000) hasrwx
(read, write, execute) access to/home/ray
. Others only haver-x
(read & execute) access to/home/ray
.> ls -l /home/ drwxr-xr-x 1 ray users 4096 Dec 7 17:18 ray
To reproduce it, we can follow instructions in pod-security.md, and add
runAsUser
andrunAsGroup
to thesecurityContext
ofray-head
in ray-cluster.pod-security.yaml.After the RayCluster is ready, use
kubectl exec ...
to log in to the head Pod. Next, execute the following commands.Use case
This is a part of the integration between KubeRay and Kubeflow. See ray-project/kuberay#750 for some context.
The text was updated successfully, but these errors were encountered: