Repository navigation
Closed
Description
/usr/local/bin/run-mysqld.sh: line 4: /var/lib/mysql/.bashrc: Permission denied
/usr/local/bin/run-mysqld.sh: line 115: /var/lib/mysql/my.cnf.template: Permission denied
Created from the following JSON:
{
"apiVersion": "v1beta1",
"items": [
{
"apiVersion": "v1beta1",
"containerPort": 3306,
"id": "database",
"kind": "Service",
"port": 5434,
"selector": {
"name": "database"
}
},
{
"apiVersion": "v1beta1",
"kind": "DeploymentConfig",
"metadata": {
"name": "database"
},
"template": {
"controllerTemplate": {
"podTemplate": {
"desiredState": {
"manifest": {
"volumes": [
{
"name": "var-lib-mysql",
"source": {
"hostDir": null,
"emptyDir": {},
"persistentDisk": null,
"gitRepo": null
}
}
],
"containers": [
{
"env": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "${MYSQL_ROOT_PASSWORD}"
},
{
"name": "MYSQL_DATABASE",
"value": "${MYSQL_DATABASE}"
}
],
"image": "openshift/mysql-55-centos7",
"name": "ruby-helloworld-database",
"ports": [
{
"containerPort": 3306
}
],
"volumeMounts": [
{
"name": "var-lib-mysql",
"mountPath": "/var/lib/mysql",
"path": "/var/lib/mysql"
}
]
}
],
"version": "v1beta1"
}
},
"labels": {
"name": "database"
}
},
"replicaSelector": {
"name": "database"
},
"replicas": 1
},
"strategy": {
"type": "Recreate"
}
},
"triggers": [
{
"type": "ConfigChange"
}
]
}
],
"kind": "Template",
"metadata": {
"annotations": {
"description": "This example shows how to create a simple ruby application in openshift origin v3"
},
"name": "ruby-helloworld-sample"
},
"parameters": [
{
"description": "administrator username",
"from": "admin[A-Z0-9]{3}",
"generate": "expression",
"name": "ADMIN_USERNAME"
},
{
"description": "administrator password",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression",
"name": "ADMIN_PASSWORD"
},
{
"description": "database password",
"from": "[a-zA-Z0-9]{8}",
"generate": "expression",
"name": "MYSQL_ROOT_PASSWORD"
},
{
"description": "database name",
"name": "MYSQL_DATABASE",
"value": "root"
}
],
"labels": {
"template": "application-template-stibuild"
}
}osc v0.4.3.2
kubernetes v0.14.1-582-gb12d75d
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.
Activity
xjvs commentedon Apr 15, 2015
There is another similar issue I reported before #1589
mfojtik commentedon Apr 15, 2015
@smarterclayton this should be assigned to @mnagy as mysql owner
mnagy commentedon Apr 15, 2015
@thoraxe You need to use /var/lib/mysql/data for the volume, not /var/lib/mysql.
@xjvs this seems unrelated to #1589.
sdodson commentedon Apr 16, 2015
So, I've worked with this example from the training quite a bit tonight. The things I've found are that the template lacks required parameters, namely
MYSQL_USERandMYSQL_PASSWORDthis is a difference betweenmysqlandopenshift/mysql-55-centos7. Beyond that I got the same permissions errors that Erik got but I think it's because the volume is misconfigured and it's re-using a volume from a previous run, when i removed the volume from the pod definition everything worked.I'll read more about volume configuration tomorrow, but I'm not certain this is any sort of bug, just misconfigured database pod definition. We should probably remove all volume definitions from the training materials, that was really only put in place to work around selinux bugs in docker 1.4 which we no longer have to worry about.
For reference the steps we're following are https://github.com/openshift/training/blob/beta3/beta-3-setup.md#create-the-database-config
sdodson commentedon Apr 21, 2015
I believe this can be closed, the problems were in the training templates for the pod.
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…