You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "zwangsheng (via GitHub)" <gi...@apache.org> on 2023/05/29 11:13:24 UTC

[GitHub] [incubator-celeborn] zwangsheng opened a new pull request, #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

zwangsheng opened a new pull request, #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     - Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
     - Be sure to keep the PR description updated to reflect all changes.
     - Please write your PR title to summarize what this PR proposes.
     - If possible, provide a concise example to reproduce the issue for a faster review.
   -->
   
   ### What changes were proposed in this pull request?
   Add `initContainer` to `chown` volumes dir for master and worker.
   
   
   ### Why are the changes needed?
   Previously, when users deployed celeborn on kubernetes for the first time (with the default HostPath mount), they encountered permission issues that could not be written.
   
   Due to k8s create dir with start kubelet user and 0755, but Celeborn run as celeborn user(uid: 10006)
   
   >DirectoryOrCreate | If nothing exists at the given path, an empty directory will be created there as needed with permission set to 0755, having the same group and ownership with Kubelet.
   
   See more in [HostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath)
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Ack tested.
   
   ![popo_2023-05-29  17-37-59](https://github.com/apache/incubator-celeborn/assets/52876270/7b9a7859-cb0d-4286-8c1e-ebd3a15e420a)
   ![popo_2023-05-29  17-50-39](https://github.com/apache/incubator-celeborn/assets/52876270/485eddac-cc8c-4a20-8e6a-4c04825c55d5)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] codecov[bot] commented on pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1567004224

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1521?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#1521](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1521?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (da76947) into [main](https://app.codecov.io/gh/apache/incubator-celeborn/commit/d30f45ad63aaccdb164f1d2b9b45338f1c66f67e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (d30f45a) will **decrease** coverage by `0.04%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##             main    #1521      +/-   ##
   ==========================================
   - Coverage   45.30%   45.26%   -0.04%     
   ==========================================
     Files         158      158              
     Lines        9769     9769              
     Branches      967      967              
   ==========================================
   - Hits         4425     4421       -4     
   - Misses       5044     5048       +4     
     Partials      300      300              
   ```
   
   
   [see 2 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-celeborn/pull/1521/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1211017777


##########
charts/celeborn/templates/worker-statefulset.yaml:
##########
@@ -71,6 +71,26 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.worker }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-worker-volume
+        image: alpine:3.18
+        imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
+        securityContext:
+          runAsUser: 0
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ .Values.securityContext.runAsGroup | default 10006 }}
+        {{- range $dir := $dirs }}
+        - {{ $dir.path }}
+        {{- end}}
+        volumeMounts:

Review Comment:
   I'm a little confused.
   
   Please correct me if you have any questions, Kubernetes volumes for pod and each container in pod should 
   declare volumeMounts.
   
   > To use a volume, specify the volumes to provide for the Pod in .spec.volumes and declare where to mount those volumes into containers in .spec.containers[*].volumeMounts.
   
   [Volumes](https://kubernetes.io/docs/concepts/storage/volumes/)
   
   So `duplicate volumnMounts` are not repetitive, but necessary, equivalent to referring to a variable.
   
   ```yaml
   containers:
       image: registry-vpc.cn-hangzhou.aliyuncs.com/emr-ack/spark-mingji:v0.2.1-incubating
       imagePullPolicy: Always
       name: celeborn
       volumeMounts:
       - mountPath: /opt/celeborn/conf
         name: celeborn-volume
         readOnly: true
       - mountPath: /mnt/disk1
         name: celeborn-worker-vol-0
       - mountPath: /mnt/disk2
         name: celeborn-worker-vol-1
       - mountPath: /mnt/disk3
         name: celeborn-worker-vol-2
       - mountPath: /mnt/disk4
         name: celeborn-worker-vol-3
       - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
         name: kube-api-access-fpmg7
         readOnly: true
   initContainers:
       image: alpine:3.18.0
       imagePullPolicy: Always
       name: chown-celeborn-worker-volume
       volumeMounts:
       - mountPath: /mnt/disk1
         name: celeborn-worker-vol-0
       - mountPath: /mnt/disk2
         name: celeborn-worker-vol-1
       - mountPath: /mnt/disk3
         name: celeborn-worker-vol-2
       - mountPath: /mnt/disk4
         name: celeborn-worker-vol-3
       - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
         name: kube-api-access-fpmg7
         readOnly: true
   volumes:
     - configMap:
         defaultMode: 420
         name: celeborn-conf
       name: celeborn-volume
     - hostPath:
         path: /mnt/disk1/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-0
     - hostPath:
         path: /mnt/disk2/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-1
     - hostPath:
         path: /mnt/disk3/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-2
     - hostPath:
         path: /mnt/disk4/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-3
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] RexXiong commented on pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1569445139

   > 
   
   
   
   > > it seems that it works indeed to set the ownership of pod‘s /xxx/rss_ratis directory to celeborn:celeborn, but ownership of sub-directory under /xxx/rss_ratis such as /xxx/rss_ratis/c5196f6d-2c34-3ed3-8b8a-47bede733167 is still not changed
   > > ![image](https://user-images.githubusercontent.com/29112453/241973984-8828bd7c-5384-46bc-b4fc-2cc9b7e6e0cc.png)
   > 
   > @mddxhj @FMX The goal of this PR is to modify the ownship of the mounted `hostPath` directory. As `c5196f6d-2c34-3ed3-8b8a-47bede733167` log file, was created Master&RaftServer, it's not within the scope of PR.
   > 
   > BTW, would your provided more info about master pod spec and properties for dig issue?
   
   This a little weird, we need more info for whether we should use `chown -R` in initContainers


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209654425


##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:

Review Comment:
   I try in local tests, setting emptyDir does not affect master startup.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] pan3793 commented on pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1567684694

   these is an unresolved comment


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1211017777


##########
charts/celeborn/templates/worker-statefulset.yaml:
##########
@@ -71,6 +71,26 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.worker }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-worker-volume
+        image: alpine:3.18
+        imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
+        securityContext:
+          runAsUser: 0
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ .Values.securityContext.runAsGroup | default 10006 }}
+        {{- range $dir := $dirs }}
+        - {{ $dir.path }}
+        {{- end}}
+        volumeMounts:

Review Comment:
   I'm a little confused.
   
   Please correct me if you have any questions, Kubernetes volumes for pod and each container in pod should 
   declare volumeMounts.
   
   > To use a volume, specify the volumes to provide for the Pod in .spec.volumes and declare where to mount those volumes into containers in .spec.containers[*].volumeMounts.
   
   [Volumes](https://kubernetes.io/docs/concepts/storage/volumes/)
   
   So `duplicate volumnMounts` are not repetitive, but necessary, equivalent to referring to a variable.
   
   ```yaml
   containers:
       image: XXX
       imagePullPolicy: Always
       name: celeborn
       volumeMounts:
       - mountPath: /opt/celeborn/conf
         name: celeborn-volume
         readOnly: true
       - mountPath: /mnt/disk1
         name: celeborn-worker-vol-0
       - mountPath: /mnt/disk2
         name: celeborn-worker-vol-1
       - mountPath: /mnt/disk3
         name: celeborn-worker-vol-2
       - mountPath: /mnt/disk4
         name: celeborn-worker-vol-3
       - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
         name: kube-api-access-fpmg7
         readOnly: true
   initContainers:
       image: alpine:3.18.0
       imagePullPolicy: Always
       name: chown-celeborn-worker-volume
       volumeMounts:
       - mountPath: /mnt/disk1
         name: celeborn-worker-vol-0
       - mountPath: /mnt/disk2
         name: celeborn-worker-vol-1
       - mountPath: /mnt/disk3
         name: celeborn-worker-vol-2
       - mountPath: /mnt/disk4
         name: celeborn-worker-vol-3
       - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
         name: kube-api-access-fpmg7
         readOnly: true
   volumes:
     - configMap:
         defaultMode: 420
         name: celeborn-conf
       name: celeborn-volume
     - hostPath:
         path: /mnt/disk1/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-0
     - hostPath:
         path: /mnt/disk2/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-1
     - hostPath:
         path: /mnt/disk3/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-2
     - hostPath:
         path: /mnt/disk4/worker
         type: DirectoryOrCreate
       name: celeborn-worker-vol-3
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209212294


##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:

Review Comment:
   is it fine is none children present?



##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:

Review Comment:
   is it fine if none children present?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1211017777


##########
charts/celeborn/templates/worker-statefulset.yaml:
##########
@@ -71,6 +71,26 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.worker }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-worker-volume
+        image: alpine:3.18
+        imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
+        securityContext:
+          runAsUser: 0
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ .Values.securityContext.runAsGroup | default 10006 }}
+        {{- range $dir := $dirs }}
+        - {{ $dir.path }}
+        {{- end}}
+        volumeMounts:

Review Comment:
   I'm a little confused.
   
   Please correct me if you have any questions, Kubernetes volumes for pod and each container in pod should 
   declare volumeMounts.
   
   > To use a volume, specify the volumes to provide for the Pod in .spec.volumes and declare where to mount those volumes into containers in .spec.containers[*].volumeMounts.
   
   [Volumes](https://kubernetes.io/docs/concepts/storage/volumes/)
   
   So `duplicate volumnMounts` are not repetitive, but necessary, equivalent to referring to a variable.
   
   ```yaml
   containers:
       image: registry-vpc.cn-hangzhou.aliyuncs.com/emr-ack/spark-mingji:v0.2.1-incubating
       imagePullPolicy: Always
       name: celeborn
       volumeMounts:
       - mountPath: /opt/celeborn/conf
         name: celeborn-volume
         readOnly: true
       - mountPath: /mnt/disk1
         name: celeborn-worker-vol-0
       - mountPath: /mnt/disk2
         name: celeborn-worker-vol-1
       - mountPath: /mnt/disk3
         name: celeborn-worker-vol-2
       - mountPath: /mnt/disk4
         name: celeborn-worker-vol-3
       - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
         name: kube-api-access-fpmg7
         readOnly: true
     initContainers:
       image: alpine:3.18.0
       imagePullPolicy: Always
       name: chown-celeborn-worker-volume
       volumeMounts:
       - mountPath: /mnt/disk1
         name: celeborn-worker-vol-0
       - mountPath: /mnt/disk2
         name: celeborn-worker-vol-1
       - mountPath: /mnt/disk3
         name: celeborn-worker-vol-2
       - mountPath: /mnt/disk4
         name: celeborn-worker-vol-3
       - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
         name: kube-api-access-fpmg7
         readOnly: true
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] RexXiong merged pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong merged PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209656935


##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:

Review Comment:
   if there is no syntax error and works well, it's fine then



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] RexXiong commented on pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1571232550

   > > This a little weird, we need more info for whether we should use `chown -R` in initContainers
   > 
   > @RexXiong Feel same, we need more info to find why touched new log file with `9999 user`
   
   Probably related to user volume/mount env as `9999 uid/pid` is created by user other pod, So IMO we can commit this first. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209275828


##########
charts/celeborn/values.yaml:
##########
@@ -34,6 +34,8 @@ masterReplicas: 3
 workerReplicas: 5
 
 securityContext:
+  runAsUser: 10006
+  runAsGroup: 10006

Review Comment:
   We define Celeborn user in Dockerfile (uid: 10006 & gid: 10006), the call is shown here and can be configured as a variable by the user
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] mddxhj commented on pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "mddxhj (via GitHub)" <gi...@apache.org>.
mddxhj commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1568390662

   it seems that it works indeed to set the ownership of  pod‘s /xxx/rss_ratis directory to celeborn:celeborn, but ownership of 
   sub-directory under /xxx/rss_ratis such as /xxx/rss_ratis/c5196f6d-2c34-3ed3-8b8a-47bede733167 is still not changed
   
   ![image](https://github.com/apache/incubator-celeborn/assets/29112453/8828bd7c-5384-46bc-b4fc-2cc9b7e6e0cc)
   
   and this will result in the following exception on celeborn master
   ```
   23/05/30 20:33:01,748 WARN [0-impl-thread1] RaftStorageDirectory: The storage directory /data/flink/celeborn/rss_ratis/c5196f6d-2c34-3ed3-8b8a-47bede733167 is not writable.
   Exception in thread "main" java.util.concurrent.CompletionException: java.io.IOException: Failed to load Storage Directory /data/flink/celeborn/rss_ratis/c5196f6d-2c34-3ed3-8b8a-47bede733167: NON_EXISTENT
   	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
   	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
   	at java.util.concurrent.CompletableFuture.biRelay(CompletableFuture.java:1298)
   	at java.util.concurrent.CompletableFuture$BiRelay.tryFire(CompletableFuture.java:1284)
   	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
   	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
   	at org.apache.ratis.util.ConcurrentUtils.accept(ConcurrentUtils.java:191)
   	at org.apache.ratis.util.ConcurrentUtils.lambda$null$4(ConcurrentUtils.java:180)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)
   Caused by: java.io.IOException: Failed to load Storage Directory /data/flink/celeborn/rss_ratis/c5196f6d-2c34-3ed3-8b8a-47bede733167: NON_EXISTENT
   	at org.apache.ratis.server.storage.RaftStorageImpl.initialize(RaftStorageImpl.java:72)
   	at org.apache.ratis.server.impl.ServerState.initialize(ServerState.java:169)
   	at org.apache.ratis.server.impl.RaftServerImpl.start(RaftServerImpl.java:338)
   	at org.apache.ratis.util.ConcurrentUtils.accept(ConcurrentUtils.java:188)
   	... 4 more
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209214296


##########
charts/celeborn/values.yaml:
##########
@@ -34,6 +34,8 @@ masterReplicas: 3
 workerReplicas: 5
 
 securityContext:
+  runAsUser: 10006
+  runAsGroup: 10006

Review Comment:
   why them are required?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] RexXiong commented on a diff in pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1210141620


##########
charts/celeborn/templates/worker-statefulset.yaml:
##########
@@ -71,6 +71,26 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.worker }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-worker-volume
+        image: alpine:3.18
+        imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
+        securityContext:
+          runAsUser: 0
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ .Values.securityContext.runAsGroup | default 10006 }}
+        {{- range $dir := $dirs }}
+        - {{ $dir.path }}
+        {{- end}}
+        volumeMounts:

Review Comment:
   There is duplicate volumnMounts for celeborn-worker-vol-{{ index }} in main containers, can we remove that? Otherwise we may have consistency problem.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] RexXiong commented on a diff in pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1211045907


##########
charts/celeborn/templates/worker-statefulset.yaml:
##########
@@ -71,6 +71,26 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.worker }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-worker-volume
+        image: alpine:3.18
+        imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
+        securityContext:
+          runAsUser: 0
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ .Values.securityContext.runAsGroup | default 10006 }}
+        {{- range $dir := $dirs }}
+        - {{ $dir.path }}
+        {{- end}}
+        volumeMounts:

Review Comment:
   OK, thanks for explanation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1569397674

   > it seems that it works indeed to set the ownership of pod‘s /xxx/rss_ratis directory to celeborn:celeborn, but ownership of sub-directory under /xxx/rss_ratis such as /xxx/rss_ratis/c5196f6d-2c34-3ed3-8b8a-47bede733167 is still not changed
   > 
   > ![image](https://user-images.githubusercontent.com/29112453/241973984-8828bd7c-5384-46bc-b4fc-2cc9b7e6e0cc.png)
   
   @mddxhj @FMX The goal of this PR is to modify the ownship of the mounted `hostPath` directory. As `c5196f6d-2c34-3ed3-8b8a-47bede733167` log file, was created Master&RaftServer, it's not within the scope of PR.
   
   BTW, would your provided more info about master pod spec and properties for dig issue?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1569449377

   > This a little weird, we need more info for whether we should use `chown -R` in initContainers
   
   @RexXiong Feel same, we need more info to find why touched new log file with `9999 user`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209679947


##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:

Review Comment:
   Local test & In Kubernetes Cluster test all fine, can run in `emptyDir` type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] RexXiong commented on a diff in pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "RexXiong (via GitHub)" <gi...@apache.org>.
RexXiong commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1210142036


##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.master }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-master-volume
+        image: alpine:3.18
+        imagePullPolicy: {{ .Values.image.pullPolicy | default "IfNotPresent" }}
+        securityContext:
+          runAsUser: 0
+        command:
+        - chown
+        - {{ .Values.securityContext.runAsUser | default 10006 }}:{{ .Values.securityContext.runAsGroup | default 10006 }}
+        - {{ (index $dirs 0).path }}
+        volumeMounts:

Review Comment:
   ditto..



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] FMX commented on pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "FMX (via GitHub)" <gi...@apache.org>.
FMX commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1568382900

   There is a user reports that this patch did not fix directory permission problem. Maybe this patch needs more tests.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209216037


##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.master }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-master-volume
+        image: alpine:3.18.0

Review Comment:
   we may want the latest patched version if possible
   ```suggestion
           image: alpine:3.18
   ```



##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:
+      {{- $dirs := .Values.volumes.master }}
+      {{- if eq "hostPath" (index $dirs 0).type }}
+      - name: chown-celeborn-master-volume
+        image: alpine:3.18.0

Review Comment:
   we may want to use the latest patched version if possible
   ```suggestion
           image: alpine:3.18
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1521: [CELEBORN-612]Set volumeMount proper permissions for user celeborn when deploy on k8s

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#discussion_r1209656773


##########
charts/celeborn/templates/master-statefulset.yaml:
##########
@@ -71,6 +71,22 @@ spec:
       securityContext:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      initContainers:

Review Comment:
   you can test the template render by `helm template`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-celeborn] pan3793 commented on pull request #1521: [CELEBORN-612][HELM] Tackle hostPath directory permission

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #1521:
URL: https://github.com/apache/incubator-celeborn/pull/1521#issuecomment-1569447197

   The `chown -R` should be used carefully, the mounted path may be shared by other Applications/Pods


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org