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

Using external DB other than Postgres does not work #78

Closed
mellena1 opened this issue Oct 11, 2018 · 7 comments
Closed

Using external DB other than Postgres does not work #78

mellena1 opened this issue Oct 11, 2018 · 7 comments

Comments

@mellena1
Copy link

Is this a request for help?: No


Is this a BUG REPORT or FEATURE REQUEST? (choose one): bug report

Version of Helm and Kubernetes: helm: 2.11.0, k8s-client: 1.12, k8s-server: 1.10.3

Which chart: Artifactory (pro/oss)

What happened: When using external db's, the README tells you to curl the plugin for the db connection as a part of the postStart lifecycle (such as the mysql connection jar). PodStart is not guaranteed to run before the entrypoint command. This causes the artifactory container to crash because the entrypoint script exits if the plugin is not found. The pod never becomes healthy.

What you expected to happen: The pod should come up healthy using the external db.

How to reproduce it (as minimally and precisely as possible): Basically just try this:

...
--set postgresql.enabled=false \
--set artifactory.postStartCommand="curl -L -o /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar https://jcenter.bintray.com/mysql/mysql-connector-java/5.1.41/mysql-connector-java-5.1.41.jar && chown 1030:1030 /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.41.jar" \
--set database.type=mysql \
--set database.host=${DB_HOST} \
--set database.port=${DB_PORT} \
--set database.user=${DB_USER} \
--set database.password=${DB_PASSWORD} \

Anything else we need to know: My thoughts on how to fix this are either add a few retries to the plugin check in the entrypoint script of the container, or start shipping all of the plugins in the container (not ideal).

@eldada
Copy link
Contributor

eldada commented Nov 25, 2018

@mellena1 - I think this is now fixed with #115. We move the pulling of the driver to a artifactory.preStartCommand now.
See the updated README.

@eldada eldada closed this as completed Nov 25, 2018
@vital4ik
Copy link

vital4ik commented Mar 6, 2019

i have tried it and it is not fixed.
there are 2 different issues.

  1. if i still want to use postgres but external - db.properties is not updated and still tries to go for the pod with postgressql
  2. when switching to mysql i get the following:
    ERROR: /var/opt/jfrog/artifactory/etc/db.properties already exists and is set to a DB different than mysql
    no matter if i change it in the values file or via command like with --set i get the same results.

@eldada
Copy link
Contributor

eldada commented Mar 7, 2019

@vital4ik - the db.properties is created on initial install and is persisted without being updated between upgrades (intentional behaviour). If you want to update it, you have to manually change it.
Was your attempt on a clean install or upgrade?
Also, please share the config you tried.

@vital4ik
Copy link

vital4ik commented Mar 7, 2019

@eldada thank you for your reply, i found out that when i do helm delete --purge it does not delete the PVC volumes. when i manually deleted and reinstalled using the template it worked.
one thing to mention, if possible add SSL value into the values file for mysql 5.7 and above and into the template.I had to specify the URL in order to work over it instead of host/port values.

@eldada
Copy link
Contributor

eldada commented Mar 7, 2019

Thx for the update @vital4ik. Adding support for SSL to DB config is planned to be added in the future.

@grrywlsn
Copy link

grrywlsn commented Jun 6, 2019

@eldada do you know when the SSL option will be added to the DB config? this is a blocker currently.

@eldada
Copy link
Contributor

eldada commented Jul 10, 2019

Sorry - I don't have an ETA yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants