Skip to content
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

Fix the broken mount point before fuse start #95

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions deploy/charts/alluxio/templates/csi/csi-fuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ data:
{{ include "alluxio.imagePullSecrets" . | indent 2 }}
{{- end}}
initContainers:
- name: umount-path
image: {{ .Values.image }}:{{ .Values.imageTag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
securityContext:
runAsUser: 0
runAsGroup: 0
privileged: true # required by bidirectional mount
command: [ "/bin/sh", "-c" ]
args:
- umount -l {{ $alluxioFuseMountPoint }} || true
volumeMounts:
- name: alluxio-fuse-mount
mountPath: {{ $hostMountPath }}
mountPropagation: Bidirectional
- name: create-alluxio-fuse-dir
image: {{ .Values.image }}:{{ .Values.imageTag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
Expand Down
16 changes: 15 additions & 1 deletion deploy/charts/alluxio/templates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ spec:
{{ include "alluxio.imagePullSecrets" . | indent 6 }}
{{- end}}
initContainers:
- name: umount-path
image: {{ .Values.image }}:{{ .Values.imageTag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
securityContext:
runAsUser: 0
runAsGroup: 0
privileged: true # required by bidirectional mount
command: [ "/bin/sh", "-c" ]
args:
- umount -l {{ $alluxioFuseMountPoint }} || true
volumeMounts:
- name: alluxio-fuse-mount
mountPath: {{ $hostMountPath }}
mountPropagation: Bidirectional
- name: path-permission
image: {{ .Values.image }}:{{ .Values.imageTag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
Expand Down Expand Up @@ -129,7 +143,7 @@ spec:
{{- end }}
command: ["/bin/sh", "-c"]
args:
- umount -l -f {{ $alluxioFuseMountPoint }};
- umount -l {{ $alluxioFuseMountPoint }};
{{- $mountTableSource := get .Values.properties "alluxio.mount.table.source" }}
{{- if or (eq $mountTableSource "ETCD") (eq $mountTableSource "STATIC_FILE") }}
/entrypoint.sh fuse {{ $alluxioFuseMountPoint }} {{- range .Values.fuse.mountOptions }} -o {{ . }} {{- end }}
Expand Down
14 changes: 14 additions & 0 deletions tests/helm/expectedTemplates/csi/csi-fuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ data:
- name: dummySecret1
- name: dummySecret2
initContainers:
- name: umount-path
image: dummy/dummy:dummy
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
runAsGroup: 0
privileged: true # required by bidirectional mount
command: [ "/bin/sh", "-c" ]
args:
- umount -l /mnt/alluxio/fuse || true
volumeMounts:
- name: alluxio-fuse-mount
mountPath: /mnt/alluxio
mountPropagation: Bidirectional
- name: create-alluxio-fuse-dir
image: dummy/dummy:dummy
imagePullPolicy: IfNotPresent
Expand Down
16 changes: 15 additions & 1 deletion tests/helm/expectedTemplates/fuse/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ spec:
- name: dummySecret1
- name: dummySecret2
initContainers:
- name: umount-path
image: dummy/dummy:dummy
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
runAsGroup: 0
privileged: true # required by bidirectional mount
command: [ "/bin/sh", "-c" ]
args:
- umount -l /mnt/alluxio/fuse || true
volumeMounts:
- name: alluxio-fuse-mount
mountPath: /mnt/alluxio
mountPropagation: Bidirectional
- name: path-permission
image: dummy/dummy:dummy
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -139,7 +153,7 @@ spec:
memory: 1Gi
command: ["/bin/sh", "-c"]
args:
- umount -l -f /mnt/alluxio/fuse;
- umount -l /mnt/alluxio/fuse;
/entrypoint.sh fuse /dummy/dataset/path /mnt/alluxio/fuse -o allow_other -o entry_timeout=3600 -o attr_timeout=3600
env:
- name: ALLUXIO_CLIENT_HOSTNAME
Expand Down