This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new a5fbc941 SUBMARINE-1229. Fix minio initContainer pod (mlflow and
server) not working error
a5fbc941 is described below
commit a5fbc941f0f561e2afc1caf89d71582c8c5418a3
Author: cdmikechen <[email protected]>
AuthorDate: Sun Apr 3 11:38:59 2022 +0800
SUBMARINE-1229. Fix minio initContainer pod (mlflow and server) not working
error
### What is this PR for?
Minio initContainer pod always shows that it cannot end correctly in
OpenShift.
```
mc: <ERROR> Unable to save new mc config. mkdir /.mc: permission denied.
mc: <ERROR> Unable to save new mc config. mkdir /.mc: permission denied.
```
Pod cannot create the specified directory because it is not granted the
permission to `runAsAnyuid`. At present, we can create a temporary volume for
mc config so that mini can initialize and execute commands correctly.
The `mc --config-dir` command part is a reference for
https://github.com/helm/charts/pull/20766/files
### What type of PR is it?
Bug Fix
### Todos
* [x] - Create an empty volume for mc config and set `config-dir`
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-1229
### How should this be tested?
Current, No
### Screenshots (if appropriate)
Current, No
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: cdmikechen <[email protected]>
Signed-off-by: Kevin <[email protected]>
Closes #918 from cdmikechen/SUBMARINE-1229 and squashes the following
commits:
76da6088 [cdmikechen] SUBMARINE-1229. Fix minio initContainer pod (mlflow
and server) not working error
---
submarine-cloud-v2/artifacts/submarine/submarine-mlflow.yaml | 11 ++++++++---
submarine-cloud-v2/artifacts/submarine/submarine-server.yaml | 12 +++++++++---
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/submarine-cloud-v2/artifacts/submarine/submarine-mlflow.yaml
b/submarine-cloud-v2/artifacts/submarine/submarine-mlflow.yaml
index 4186ab25..dbc513a9 100644
--- a/submarine-cloud-v2/artifacts/submarine/submarine-mlflow.yaml
+++ b/submarine-cloud-v2/artifacts/submarine/submarine-mlflow.yaml
@@ -69,7 +69,7 @@ spec:
image: "minio/mc"
command: ["/bin/bash", "-c",
"cnt=0;
- while ! /bin/bash -c 'mc config host add minio
http://submarine-minio-service:9000
+ while ! /bin/bash -c 'mc --config-dir /root/.mc config host add minio
http://submarine-minio-service:9000
submarine_minio submarine_minio' 2>&1;
do
sleep 15;
@@ -79,11 +79,14 @@ spec:
exit 1;
fi;
done;
- if /bin/bash -c 'mc ls minio/mlflow' >/dev/null 2>&1; then
+ if /bin/bash -c 'mc --config-dir /root/.mc ls minio/mlflow' >/dev/null
2>&1; then
echo 'Bucket minio/mlflow already exists, skipping creation.';
else
- /bin/bash -c 'mc mb minio/mlflow';
+ /bin/bash -c 'mc --config-dir /root/.mc mb minio/mlflow';
fi;"]
+ volumeMounts:
+ - name: mc-config-vol
+ mountPath: /root/.mc
containers:
- name: submarine-mlflow-container
image: apache/submarine:mlflow-0.7.0
@@ -103,6 +106,8 @@ spec:
- name: "volume"
persistentVolumeClaim:
claimName: "submarine-mlflow-pvc"
+ - name: mc-config-vol
+ emptyDir: { }
---
# Source: submarine/templates/submarine-mlflow.yaml
apiVersion: traefik.containo.us/v1alpha1
diff --git a/submarine-cloud-v2/artifacts/submarine/submarine-server.yaml
b/submarine-cloud-v2/artifacts/submarine/submarine-server.yaml
index 9887d5e3..f1148fe4 100644
--- a/submarine-cloud-v2/artifacts/submarine/submarine-server.yaml
+++ b/submarine-cloud-v2/artifacts/submarine/submarine-server.yaml
@@ -65,7 +65,7 @@ spec:
image: "minio/mc"
command: ["/bin/bash", "-c",
"cnt=0;
- while ! /bin/bash -c 'mc config host add minio
http://submarine-minio-service:9000
+ while ! /bin/bash -c 'mc --config-dir /root/.mc config host add minio
http://submarine-minio-service:9000
submarine_minio submarine_minio' 2>&1;
do
sleep 15;
@@ -75,11 +75,17 @@ spec:
exit 1;
fi;
done;
- if /bin/bash -c 'mc ls minio/submarine' >/dev/null 2>&1; then
+ if /bin/bash -c 'mc --config-dir /root/.mc ls minio/submarine'
>/dev/null 2>&1; then
echo 'Bucket minio/submarine already exists, skipping creation.';
else
- /bin/bash -c 'mc mb minio/submarine';
+ /bin/bash -c 'mc --config-dir /root/.mc mb minio/submarine';
fi;"]
+ volumeMounts:
+ - name: mc-config-vol
+ mountPath: /root/.mc
+ volumes:
+ - name: mc-config-vol
+ emptyDir: { }
containers:
- name: "submarine-server"
env:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]