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

Add server_multithreaded parameter #720

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

alexjfisher
Copy link
Contributor

Puppet Server 6.8 has just been released with an experimental new
feature.

This release adds a new JRuby pool architecture that maintains a
single JRuby instance through which requests to Puppet Server are run
concurrently. In this mode, the server's memory footprint is
significantly lighter, because it no longer needs to run multiple JRuby
instances. Toggle this behavior by setting the
jruby-puppet.multithreaded to true.

This commit adds support for this new setting.

Puppet Server 6.8 has just been released with an experimental new
feature.

> This release adds a new JRuby pool architecture that maintains a
> single JRuby instance through which requests to Puppet Server are run
> concurrently. In this mode, the server's memory footprint is
> significantly lighter, because it no longer needs to run multiple JRuby
> instances. Toggle this behavior by setting the
> `jruby-puppet.multithreaded` to `true`.

This commit adds support for this new setting.
@ekohl ekohl merged commit 0de3202 into theforeman:master Jan 15, 2020
@ekohl
Copy link
Member

ekohl commented Jan 20, 2020

Looking closer, it would be better to use the real_puppetserver_version variable as determined here:

# For Puppetserver, certain configuration parameters are version specific. We
# assume a particular version here.
if $puppetserver_version {
$real_puppetserver_version = $puppetserver_version
} elsif versioncmp($::puppetversion, '6.0.0') >= 0 {
$real_puppetserver_version = '6.0.0'
} else {
$real_puppetserver_version = '5.3.6'
}

The reason is that the version number might be undef (default).

@alexjfisher
Copy link
Contributor Author

I think this is already the case? (Although the module can be a bit confusing to follow). The template function is called from puppetserver.pp and uses $server_puppetserver_version. This defaults to $::puppet::server::real_puppetserver_version.

$server_puppetserver_version = $::puppet::server::real_puppetserver_version,

@ekohl
Copy link
Member

ekohl commented Jan 20, 2020

You're right on that part. However, maybe it's good to add another condition that if the puppetversion is at least 6.12.0 then the puppetserver version is 6.8.0?

@alexjfisher
Copy link
Contributor Author

You're right on that part. However, maybe it's good to add another condition that if the puppetversion is at least 6.12.0 then the puppetserver version is 6.8.0?

That could very easily not be true though. The current code is conservative. If your puppet version is 6.X, then so is your puppetserver. Much more than that would probably be too great an assumption.

@ekohl
Copy link
Member

ekohl commented Jan 20, 2020

yes, in general it's a complicated situation.

@alexjfisher alexjfisher deleted the puppetserver_multithreaded branch April 8, 2021 19:29
This pull request was closed.
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