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

Use current timeout management variables #693

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions manifests/agent/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
'noop': value => $::puppet::agent_noop;
'usecacheonfailure': value => $::puppet::usecacheonfailure;
}
if $::puppet::configtimeout != undef {
if $::puppet::http_connect_timeout != undef {
puppet::config::agent {
'configtimeout': value => $::puppet::configtimeout;
'http_connect_timeout': value => $::puppet::http_connect_timeout;
}
}
if $::puppet::http_read_timeout != undef {
puppet::config::agent {
'http_read_timeout': value => $::puppet::http_read_timeout;
}
}
if $::puppet::prerun_command {
Expand Down
15 changes: 10 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@
#
# $module_repository:: Use a different puppet module repository
#
# $configtimeout:: How long the client should wait for the
# configuration to be retrieved before
# considering it a failure.
#
# $ca_server:: Use a different ca server. Should be either
# a string with the location of the ca_server
# or 'false'.
Expand All @@ -119,6 +115,14 @@
#
# $additional_settings:: A hash of additional main settings.
#
# $http_connect_timeout:: The maximum amount of time an agent waits
# when establishing an HTTP connection.
#
# $http_read_timeout:: The time an agent waits for one block to be
# read from an HTTP connection. If nothing is
# read after the elapsed interval then the
# connection will be closed.
#
# == Advanced puppet parameters
#
# $user:: Override the name of the puppet user.
Expand Down Expand Up @@ -578,7 +582,8 @@
Boolean $agent_noop = $puppet::params::agent_noop,
Boolean $show_diff = $puppet::params::show_diff,
Optional[Stdlib::HTTPUrl] $module_repository = $puppet::params::module_repository,
Optional[Integer[0]] $configtimeout = $puppet::params::configtimeout,
Optional[Integer[0]] $http_connect_timeout = $puppet::params::http_connect_timeout,
Optional[Integer[0]] $http_read_timeout = $puppet::params::http_read_timeout,
Optional[Variant[String, Boolean]] $ca_server = $puppet::params::ca_server,
Optional[Integer[0, 65535]] $ca_port = $puppet::params::ca_port,
Optional[String] $ca_crl_filepath = $puppet::params::ca_crl_filepath,
Expand Down
3 changes: 2 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
}
}

$configtimeout = undef
$http_connect_timeout = undef
$http_read_timeout = undef

$autosign = "${dir}/autosign.conf"
$autosign_entries = []
Expand Down
3 changes: 2 additions & 1 deletion spec/classes/puppet_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@

it { should contain_concat(conf_file) }

it { should_not contain_puppet__config__agent('configtimeout') }
it { should_not contain_puppet__config__agent('http_connect_timeout') }
it { should_not contain_puppet__config__agent('http_read_timeout') }
it { should_not contain_class('puppetdb') }
it { should_not contain_class('puppetdb::master::config') }
it { should_not contain_file("#{confdir}/custom_trusted_oid_mapping.yaml") }
Expand Down