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

openshift mysql image won't start #1740

Closed
thoraxe opened this issue Apr 14, 2015 · 5 comments
Closed

openshift mysql image won't start #1740

thoraxe opened this issue Apr 14, 2015 · 5 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@thoraxe
Copy link
Contributor

thoraxe commented Apr 14, 2015

/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
@brenton brenton added the kind/bug Categorizes issue or PR as related to a bug. label Apr 14, 2015
@brenton brenton added this to the 0.5.0 (beta3) milestone Apr 14, 2015
@xjvs
Copy link

xjvs commented Apr 15, 2015

There is another similar issue I reported before #1589

@mfojtik
Copy link
Contributor

mfojtik commented Apr 15, 2015

@smarterclayton this should be assigned to @mnagy as mysql owner

@mnagy
Copy link
Contributor

mnagy commented 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
Copy link
Member

sdodson commented 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_USER and MYSQL_PASSWORD this is a difference between mysql and openshift/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
Copy link
Member

sdodson commented Apr 21, 2015

I believe this can be closed, the problems were in the training templates for the pod.

jpeeler pushed a commit to jpeeler/origin that referenced this issue Mar 1, 2018
…service-catalog/' changes from b758460ba7..c3e3071633

c3e3071633 origin build: add origin tooling
97ddbab chart changes for v0.1.9 (openshift#1776)
b5168a7 Add unit tests for class, instance, plan backends in svcat (openshift#1763)
97d11cb prometheus: only return catalog specific metrics (openshift#1774)
0fb00e3 Bump dependency on go-open-service-broker-client to 0.0.4 (openshift#1775)
0a9f1e4 Reset RemovedFromBrokerCatalog when broker re-adds a removed service class (openshift#1770)
28ec5ed Bump dependency on go-open-service-broker-client to 0.0.3 (openshift#1768)
ca83d18 handle binding deletion that occurs during async bind (openshift#1760)
858d467 2 of 4 fixes for golang 1.10 (openshift#1764)
656156b Add unit tests for binding and broker backends in svcat
ec05486 In svcat verify service instance exists on unbind (openshift#1750)
e6315a4 fix indentation from openshift#1725 (openshift#1759)
62284da Publish svcat binaries during build (openshift#1725)
8f986ae also build with golang tip and allow tip to fail (openshift#1734)
127561e use pvc for etcd volume (openshift#1684)
7d155e5 Ensure only href-checker runs on docs only commit (openshift#1693)
4ea44c4 log the version and build date on server startup (openshift#1746)
0db9519 allow getting and describing plans with class/plan name combo in svcat (openshift#1743)
b1da783 print schemas when describing plan in svcat (openshift#1740)
7a7fcce Add constraint for go-open-service-broker-client (openshift#1738)
3070003 Increase timeout for broker condition polling in e2e (openshift#1745)
b6878f7 Avoid Setting Authentication header twice (openshift#1685)
5317111 wrap "rm -rf" with docker (openshift#1735)
d7c0bf2 Allow upper case letters in Plan names (openshift#1668)
6b27ba6  Add a constraint on go-autorest  (openshift#1732)
b3de6ec Added validation for ServiceBinding spec ParametersFrom
REVERT: b758460ba7 origin build: modify hard coded path
REVERT: 871582f73a origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: c3e3071633b91541cf9f1000d2d5115cdd31de1b
jpeeler pushed a commit to jpeeler/origin that referenced this issue Mar 1, 2018
…service-catalog/' changes from b758460ba7..c3e3071633

c3e3071633 origin build: add origin tooling
97ddbab chart changes for v0.1.9 (openshift#1776)
b5168a7 Add unit tests for class, instance, plan backends in svcat (openshift#1763)
97d11cb prometheus: only return catalog specific metrics (openshift#1774)
0fb00e3 Bump dependency on go-open-service-broker-client to 0.0.4 (openshift#1775)
0a9f1e4 Reset RemovedFromBrokerCatalog when broker re-adds a removed service class (openshift#1770)
28ec5ed Bump dependency on go-open-service-broker-client to 0.0.3 (openshift#1768)
ca83d18 handle binding deletion that occurs during async bind (openshift#1760)
858d467 2 of 4 fixes for golang 1.10 (openshift#1764)
656156b Add unit tests for binding and broker backends in svcat
ec05486 In svcat verify service instance exists on unbind (openshift#1750)
e6315a4 fix indentation from openshift#1725 (openshift#1759)
62284da Publish svcat binaries during build (openshift#1725)
8f986ae also build with golang tip and allow tip to fail (openshift#1734)
127561e use pvc for etcd volume (openshift#1684)
7d155e5 Ensure only href-checker runs on docs only commit (openshift#1693)
4ea44c4 log the version and build date on server startup (openshift#1746)
0db9519 allow getting and describing plans with class/plan name combo in svcat (openshift#1743)
b1da783 print schemas when describing plan in svcat (openshift#1740)
7a7fcce Add constraint for go-open-service-broker-client (openshift#1738)
3070003 Increase timeout for broker condition polling in e2e (openshift#1745)
b6878f7 Avoid Setting Authentication header twice (openshift#1685)
5317111 wrap "rm -rf" with docker (openshift#1735)
d7c0bf2 Allow upper case letters in Plan names (openshift#1668)
6b27ba6  Add a constraint on go-autorest  (openshift#1732)
b3de6ec Added validation for ServiceBinding spec ParametersFrom
REVERT: b758460ba7 origin build: modify hard coded path
REVERT: 871582f73a origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: c3e3071633b91541cf9f1000d2d5115cdd31de1b
jpeeler pushed a commit to jpeeler/origin that referenced this issue Mar 8, 2018
…service-catalog/' changes from b758460ba7..c3e3071633

c3e3071633 origin build: add origin tooling
97ddbab chart changes for v0.1.9 (openshift#1776)
b5168a7 Add unit tests for class, instance, plan backends in svcat (openshift#1763)
97d11cb prometheus: only return catalog specific metrics (openshift#1774)
0fb00e3 Bump dependency on go-open-service-broker-client to 0.0.4 (openshift#1775)
0a9f1e4 Reset RemovedFromBrokerCatalog when broker re-adds a removed service class (openshift#1770)
28ec5ed Bump dependency on go-open-service-broker-client to 0.0.3 (openshift#1768)
ca83d18 handle binding deletion that occurs during async bind (openshift#1760)
858d467 2 of 4 fixes for golang 1.10 (openshift#1764)
656156b Add unit tests for binding and broker backends in svcat
ec05486 In svcat verify service instance exists on unbind (openshift#1750)
e6315a4 fix indentation from openshift#1725 (openshift#1759)
62284da Publish svcat binaries during build (openshift#1725)
8f986ae also build with golang tip and allow tip to fail (openshift#1734)
127561e use pvc for etcd volume (openshift#1684)
7d155e5 Ensure only href-checker runs on docs only commit (openshift#1693)
4ea44c4 log the version and build date on server startup (openshift#1746)
0db9519 allow getting and describing plans with class/plan name combo in svcat (openshift#1743)
b1da783 print schemas when describing plan in svcat (openshift#1740)
7a7fcce Add constraint for go-open-service-broker-client (openshift#1738)
3070003 Increase timeout for broker condition polling in e2e (openshift#1745)
b6878f7 Avoid Setting Authentication header twice (openshift#1685)
5317111 wrap "rm -rf" with docker (openshift#1735)
d7c0bf2 Allow upper case letters in Plan names (openshift#1668)
6b27ba6  Add a constraint on go-autorest  (openshift#1732)
b3de6ec Added validation for ServiceBinding spec ParametersFrom
REVERT: b758460ba7 origin build: modify hard coded path
REVERT: 871582f73a origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: c3e3071633b91541cf9f1000d2d5115cdd31de1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

7 participants