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

Can't deploy apps that have persist volume claims #37

Closed
ryannix123 opened this issue Apr 14, 2018 · 7 comments
Closed

Can't deploy apps that have persist volume claims #37

ryannix123 opened this issue Apr 14, 2018 · 7 comments
Assignees
Labels
more info More information is require to move forward problem Looks like a valid problem, but not as our bug

Comments

@ryannix123
Copy link
Contributor

ryannix123 commented Apr 14, 2018

I finally got my cluster to build correctly with the service catalog installed. I believe what was hanging my install up was that port 80 and 443 were not available to the outside world. Once that was cleared up, my cluster installed with the service broker installed.

My new issue is that I can't deploy any apps from the service catalog that have persistence i.e. cake-php-mysql non-ephemeral. Ephermal apps deploy just fine.

Recreate:

  1. sh createPV.sh, which is located in /tmp of installcentos
  2. Run oc get pv to confirm the existence of pv claims. Confirmed to work
  3. Deploy app that needs persistence. e.g. Jenkins, php-mysql, etc
  4. Run oc get pv again to confirm app has made a claim. Confirmed to work

Sample output:

=> sourcing 20-validate-variables.sh ... => sourcing 25-validate-replication-variables.sh ... => sourcing 30-base-config.sh ... ---> 18:23:21 Processing basic MySQL configuration files ... => sourcing 60-replication-config.sh ... => sourcing 70-s2i-config.sh ... ---> 18:23:21 Processing additional arbitrary MySQL configuration provided by s2i ... => sourcing 40-paas.cnf ... => sourcing 50-my-tuning.cnf ... ---> 18:23:21 Initializing database ... ---> 18:23:21 Running mysqld --initialize-insecure ... mysqld: Can't create directory '/var/lib/mysql/data/' (Errcode: 17 - File exists) 2018-04-14T18:23:21.872387Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-04-14T18:23:21.890075Z 0 [Warning] Duplicate ignore-db-dir directory name 'lost+found' found in the config file(s). Ignoring the duplicate. 2018-04-14T18:23:21.890196Z 0 [ERROR] Aborting

Apps fail to deploy each time, although there is a claim. What could be happening?

@marekjelen marekjelen self-assigned this Apr 23, 2018
@marekjelen marekjelen added more info More information is require to move forward problem Looks like a valid problem, but not as our bug labels Apr 23, 2018
@DominikPieper
Copy link

DominikPieper commented Apr 24, 2018

Same problem here. I can't deploy any pods with storage.

@hhorak
Copy link

hhorak commented Apr 25, 2018

There are obviously some files in the MySQL directory /var/lib/mysql/data/. We saw errors like this and it was always some wrong configuration of PV, so I'd suggest to focus on that part.

@ryannix123
Copy link
Contributor Author

@hhorak @marekjelen I thought we solved this issue at Summit, however, there is an inheritance problem on the directory. I have to chmod 777 the pod to get the persistent volume claim to work. I even tried chmod g+s data/ on the directory, but the 777 perms won't inherit.

@marekjelen
Copy link
Contributor

Nope, they will not inherit, for each dir that is being used as a PV you need to set the selinux context and 777 explicitly.

@hhorak
Copy link

hhorak commented May 21, 2018

@ryannix123 is it possible to export the resulting OpenShift objects as a JSON file, so we can just take to reproduce the issue?

@hhorak
Copy link

hhorak commented May 21, 2018

@kubco2 FYI

@marekjelen
Copy link
Contributor

Updated the script to automatically create 200 PVs with Retain policy. This should be enough for playground clusters. There were two problems

a) the PV script was faulty
b) the Reclaim policy seems to remove the permissions set by the script

And so a) was an easy fixe, as for b) the Retain policy should help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info More information is require to move forward problem Looks like a valid problem, but not as our bug
Projects
None yet
Development

No branches or pull requests

4 participants