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

Updated run.sh to pass in the mysql key & trust stores. #85

Merged
merged 13 commits into from
Jul 22, 2015

Conversation

kshakir
Copy link
Contributor

@kshakir kshakir commented Jul 8, 2015

Also updated jenkins with file that appears in the dev /etc/cromwell.conf.

@kshakir
Copy link
Contributor Author

kshakir commented Jul 8, 2015

Tex-- assuming liquibase has been successfully run in the past, this run.sh, combined with the latest jenkins config file, should start up the server cleanly. If you could sanity check run for me, I'd appreciate it.

@mcovarr mcovarr force-pushed the ks_run_server_mysql branch from 2a47501 to 0df08fd Compare July 15, 2015 20:11
@kshakir kshakir force-pushed the ks_run_server_mysql branch 2 times, most recently from f259188 to dfaf501 Compare July 21, 2015 20:43
@mcovarr
Copy link
Contributor

mcovarr commented Jul 21, 2015

So... what exactly was not working before?

/**
* Returns the value of either the "url" or "properties.url"
*/
def urlValue = config.getString(urlKey)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would we expect one or the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using HikariCP, the default Slick 3.0.0 connection pool, with the newer javax.sql.DataSource, the urlKey is properties.url. For other combinations, the key is url.

The following additional keys are supported for HikariCP only:
• dataSourceClass (String, optional): ... Note that url is ignored when this key is set (You have to use properties to configure the database connection instead).

-- Database.forConfig

@kshakir
Copy link
Contributor Author

kshakir commented Jul 22, 2015

Not 100% sure what wasn't working at what point.

I suspect that based on the order of the original commits1, the RunMysql and server should have both worked at "4.". At that point I believe the config url still contained useSSL=true, the application config was being passed on the command line, and the mysql jdbc code should have been in the main assembly.

By the time I was running "11." earlier today, the configuration url no longer contained useSSL=true, and connections within SlickDataAccess were returning the error combo:

java.sql.SQLTimeoutException: Timeout after 1000ms of waiting for a connection.
...
Caused by: java.sql.SQLException: Access denied for user '…'@'…' (using password: YES)

I did add another variable in "11." by always testing with useSSL=true&requireSSL=true, but according to the logs of the latest 'RunMysql', jdbcMain and jdbcRequireSsl passed. So that shouldn't have changed the results.

Meanwhile, all test combinations of setting ssl worked for both slick and raw datasource connections, in tests via the url (Ssl), or via the dataSource properties (*Prop). So I think just setting back the useSSL=true is the minimum required fix, but I'd prefer to see requiredSSL=true added as well, as was successfully run in slickSslDriver.

1 What I believe is the previous order of the commits:

  1. Updated run.sh to pass in the mysql key & trust stores.
  2. log database config
  3. make mysql not test-only
  4. Add config file option in run.sh to make container use custom configuration
  5. debugging "script"
  6. log actual uniquified config
  7. Test at JDBC level.
  8. hardcode use of SSL
  9. count rows in WORKFLOW_EXECUTION
  10. Logging the just the URL in SlickDataAccess, not the entire config.
  11. Added a suite of mysql ssl test.

@kshakir kshakir force-pushed the ks_run_server_mysql branch from dfaf501 to 7ce675b Compare July 22, 2015 15:00
@kshakir
Copy link
Contributor Author

kshakir commented Jul 22, 2015

Received a verbal tentative 👍 from @mcovarr (I will follow up with more inline docs regarding conversation above) and 👍 from @coreone with his latest JAVA_OPTS commit.

This jenkins build may break in develop due to server-conf-file logic required from #102, but we believe it should all work once that's merged in too.

Merging.

kshakir added a commit that referenced this pull request Jul 22, 2015
Updated run.sh to pass in the mysql key & trust stores.
@kshakir kshakir merged commit c56b1bc into develop Jul 22, 2015
@kshakir kshakir deleted the ks_run_server_mysql branch July 22, 2015 16:24
mcovarr pushed a commit that referenced this pull request Oct 4, 2017
mcovarr pushed a commit that referenced this pull request Oct 21, 2017
* Fix stackoverflow if a test fails

* PR comment
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

Successfully merging this pull request may close these issues.

3 participants