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

(PDB-1455) Provide mechanism for modifying default HSQLDB path #185

Conversation

kbarber
Copy link
Contributor

@kbarber kbarber commented Jun 10, 2015

This provides an override mechanism for providing a custom path to HSQLDB.

This allows users to provide any path to their HSQLDB database. It is needed
specifically for managing the as-yet-unreleased version of PuppetDB as well.

Signed-off-by: Ken Barber ken@bob.sh

@@ -70,7 +70,7 @@
case $::osfamily {
'RedHat', 'Suse', 'Archlinux': {
$confdir = '/etc/puppetdb/conf.d'
$embedded_subname = 'file:/var/lib/puppetdb/db/db;hsqldb.tx=mvcc;sql.syntax_pgs=true'
$database_path = '/var/lib/puppetdb/db/db'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The embedded_subname was never a configurable parameter, so I've switched the focus here over to just the path - now we fill in the remaining parts of subname inside database_ini.pp in only one place (since it never should be different per OS anyway).

@kbarber kbarber force-pushed the ticket/stable/pdb-1455-allow-custom-embedded-subname branch from 9a10b86 to 2da3eee Compare June 10, 2015 11:53
@@ -0,0 +1,140 @@
require 'spec_helper'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was no coverage here, so I've added default coverage+tests for this particular change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@kbarber kbarber mentioned this pull request Jun 10, 2015
@kbarber kbarber force-pushed the ticket/stable/pdb-1455-allow-custom-embedded-subname branch from 2da3eee to b871568 Compare June 10, 2015 14:01
@@ -257,6 +257,10 @@ Setting up proper trust- and keystores has to be managed outside of the puppetdb

If true, the module will attempt to connect to the database using the specified settings and fail if it is not able to do so. (defaults to true)

####`database_path`
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer this be called something more like embedded_database_path just to be explicit about the case it's used for, it will also signal to users that they need not care about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about database_embedded_path? Thats how all the other variables are named.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, you'll want to git diff -w, since we still use the aligning arrows/equals style here and I had to line up a lot of stuff since database_embedded_path is long :-).

@ajroetker
Copy link
Contributor

👍 modulo the name change, let me know what you think about that

This provides an override mechanism for providing a custom path to HSQLDB.

This allows users to provide any path to their HSQLDB database. It is needed
specifically for managing the as-yet-unreleased version of PuppetDB as well.

Signed-off-by: Ken Barber <ken@bob.sh>
@kbarber kbarber force-pushed the ticket/stable/pdb-1455-allow-custom-embedded-subname branch from b871568 to 1b661fd Compare June 10, 2015 18:04
@ajroetker
Copy link
Contributor

lgtm tests passed for me locally, I'll merge when they go green

@kbarber
Copy link
Contributor Author

kbarber commented Jun 10, 2015

@ajroetker green now.

ajroetker added a commit that referenced this pull request Jun 10, 2015
…tom-embedded-subname

(PDB-1455) Provide mechanism for modifying default HSQLDB path
@ajroetker ajroetker merged commit 7577699 into puppetlabs:stable Jun 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants