Hi Slava,
The two pvc "ocai-mysql-claim" and "ocai-nb-claim" are consuming two pv which
are resides on one real storage. After deploying it on openshift origin
cluster, "empty" password worked when connecting to mysql.
And endpoint for glusterfs was destroyed soon after deployment, I didn't find
out the reason.
Then I modified the deployment as below. And mysql worked as expected.
Now I have two questions:
1, Could two pv reside on one real volume? For example, glusterfs volume
2, I found glusterfs related endpoints disappeared after running deployment
successfully. How could I debug such issue?
spec:
containers:
- name: ocai
image: aura/web:develop
imagePullPolicy: Always
ports:
- containerPort: 9000
- name: notebook
image: aura/all-spark-notebook:latest
imagePullPolicy: Always
ports:
- containerPort: 8889
command: ["sh", "-c", "jupyter-notebook --port=8889
--NotebookApp.token='9e4f96c5239743a8dd5910216c6f02dad89a58932d63db7f'
--config=/jupyter_notebook_config.py --no-browser"]
volumeMounts:
- mountPath: /data/ai_lab/ocai/
name: ocai-data
subPath: nb
resources:
requests:
memory: 4Gi
- name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: Ocai@1234
image: aura/mysql:5.7
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3306
volumeMounts:
- mountPath: "/var/lib/mysql"
name: ocai-data
subPath: mysql
resources:
requests:
memory: 2G
volumes:
- name: ocai-data
persistentVolumeClaim:
claimName: ocai-claim
Thanks,
Jared, (韦煜)
Software developer
Interested in open source software, big data, Linux
From: Vyacheslav Semushin
Sent: Monday, November 27, 2017 9:52:50 PM
To: Yu Wei
Cc: us...@lists.openshift.redhat.com; dev@lists.openshift.redhat.com
Subject: Re: environment variables when running multiple containers in one pod
2017-11-27 10:34 GMT+01:00 Yu Wei
mailto:yu20...@hotmail.com>>:
Hi,
When running mysql with other containers within one pod, it seemed that
environment variable "MYSQL_ROOT_PASSWORD" didn't work as expected.
Password set in "MYSQL_ROOT_PASSWORD" couldn't be used for connecting to mysql.
It doesn't work only when other containers are being created and when they try
to connect to mysql container? If yes, then it could be a race when mysql
container isn't ready while others try to connect to it.
--
Slava Semushin | OpenShift
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev