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

Manage the pool size configuration parameters in database.ini #232

Merged
merged 5 commits into from
Jun 23, 2016
Merged

Manage the pool size configuration parameters in database.ini #232

merged 5 commits into from
Jun 23, 2016

Conversation

kpaulisse
Copy link

#229 is a PR from a few weeks ago to add pool size configuration parameters to database.ini. I also needed this feature, but I run PuppetDB 3.2 and because of differences in the parameter name, I needed to make some updates. Unfortunately, I didn't receive a response when I submitted these changes to the author of that PR (in nward#1) so I am opening this directly here.

In this implementation, the default is that partition-conn-max/ maximum-pool-size will not be put into the configuration files. If specified by appropriately named hiera keys or other lookup method, then partition-conn-max will be configured for PuppetDB 3.2, and maximum-pool-size will be configured for PuppetDB 4.0 and later.

I have tested this on PuppetDB 3.2 and it works. I don't have PuppetDB 4.0 so I can't test the end result there. I've also resolved the merge conflicts between #229 and the current master, to make this merge-able.

@kbarber kbarber added this to the 5.2.0 (master) milestone Jun 2, 2016
@ajroetker
Copy link
Contributor

@kpaulisse Thanks for the contribution! I'll test this out.

# Get the parameter name for the database connection pool tuning
if $puppetdb_version in ['latest','present'] or versioncmp($puppetdb_version, '4.0.0') >= 0 {
$database_max_pool_size_setting_name = 'maximum-pool-size'
} elsif versioncmp($puppetdb_version, '3.2.0') >= 0 {
Copy link
Contributor

@ajroetker ajroetker Jun 22, 2016

Choose a reason for hiding this comment

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

We could set this all the way to 2.8.0 at least! :)

Copy link
Author

Choose a reason for hiding this comment

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

I'm absolutely happy to do that - but I have no way of testing anything less than 3.2 for myself.

Copy link
Contributor

Choose a reason for hiding this comment

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

No problem I've got you covered there, I've verified this on 2.8.7 so it should be ok for the whole of the 2.8 series (which is as far back as we support anyways).

Copy link
Author

Choose a reason for hiding this comment

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

Updated code to change 3.2.0 to 2.8.0 for that comparison. Thanks!

@ajroetker
Copy link
Contributor

👍 from me. Will merge when I get another quick sanity check from another PuppetDB team member.

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.

4 participants