Update ldap-backend options

Several of the options defined in ldap_backend.pp were using duplicate
values already specified in keystone/conf/ldap.py. Instead of
duplicating the same value, we can set them to undefined and just let
the default values from keystone come through.

This commit also updates the values of use_pool and use_auth_pool to
True so they're consistent with the default values in keystone.

Co-Authored-By: Dave Wilde <dwilde@redhat.com>

Change-Id: I507d1b736dbbb147c67b9d399c033703b432b16d
(cherry picked from commit 1081ac51db)
(cherry picked from commit e59b906698)
(cherry picked from commit 2821509f0e)
(cherry picked from commit 6e29624320)
This commit is contained in:
Lance Bragstad 2020-03-18 18:04:58 +00:00 committed by Keigo Noha
parent 86798f135e
commit f65517dcf0
2 changed files with 18 additions and 36 deletions

View File

@ -341,40 +341,40 @@
# #
# [*use_pool*] # [*use_pool*]
# Enable LDAP connection pooling. (boolean value) # Enable LDAP connection pooling. (boolean value)
# Defaults to false # Defaults to 'undef'
# #
# [*pool_size*] # [*pool_size*]
# Connection pool size. (integer value) # Connection pool size. (integer value)
# Defaults to '10' # Defaults to 'undef'
# #
# [*pool_retry_max*] # [*pool_retry_max*]
# Maximum count of reconnect trials. (integer value) # Maximum count of reconnect trials. (integer value)
# Defaults to '3' # Defaults to 'undef'
# #
# [*pool_retry_delay*] # [*pool_retry_delay*]
# Time span in seconds to wait between two reconnect trials. (floating point value) # Time span in seconds to wait between two reconnect trials. (floating point value)
# Defaults to '0.1' # Defaults to 'undef'
# #
# [*pool_connection_timeout*] # [*pool_connection_timeout*]
# Connector timeout in seconds. Value -1 indicates indefinite wait for response. (integer value) # Connector timeout in seconds. Value -1 indicates indefinite wait for response. (integer value)
# Defaults to '-1' # Defaults to 'undef'
# #
# [*pool_connection_lifetime*] # [*pool_connection_lifetime*]
# Connection lifetime in seconds. (integer value) # Connection lifetime in seconds. (integer value)
# Defaults to '600' # Defaults to 'undef'
# #
# [*use_auth_pool*] # [*use_auth_pool*]
# Enable LDAP connection pooling for end user authentication. # Enable LDAP connection pooling for end user authentication.
# If use_pool is disabled, then this setting is meaningless and is not used at all. (boolean value) # If use_pool is disabled, then this setting is meaningless and is not used at all. (boolean value)
# Defaults to false # Defaults to 'undef'
# #
# [*auth_pool_size*] # [*auth_pool_size*]
# End user auth connection pool size. (integer value) # End user auth connection pool size. (integer value)
# Defaults to '100' # Defaults to 'undef'
# #
# [*auth_pool_connection_lifetime*] # [*auth_pool_connection_lifetime*]
# End user auth connection lifetime in seconds. (integer value) # End user auth connection lifetime in seconds. (integer value)
# Defaults to '60' # Defaults to 'undef'
# #
# [*package_ensure*] # [*package_ensure*]
# (optional) Desired ensure state of packages. # (optional) Desired ensure state of packages.
@ -471,15 +471,15 @@ define keystone::ldap_backend(
$identity_driver = 'ldap', $identity_driver = 'ldap',
$assignment_driver = undef, $assignment_driver = undef,
$credential_driver = undef, $credential_driver = undef,
$use_pool = false, $use_pool = undef,
$pool_size = 10, $pool_size = undef,
$pool_retry_max = 3, $pool_retry_max = undef,
$pool_retry_delay = 0.1, $pool_retry_delay = undef,
$pool_connection_timeout = -1, $pool_connection_timeout = undef,
$pool_connection_lifetime = 600, $pool_connection_lifetime = undef,
$use_auth_pool = false, $use_auth_pool = undef,
$auth_pool_size = 100, $auth_pool_size = undef,
$auth_pool_connection_lifetime = 60, $auth_pool_connection_lifetime = undef,
$package_ensure = present, $package_ensure = present,
$manage_packages = true, $manage_packages = true,
$create_domain_entry = false, $create_domain_entry = false,

View File

@ -353,17 +353,8 @@ EOC
it_behaves_like 'a_valid_configuration', <<-EOC it_behaves_like 'a_valid_configuration', <<-EOC
[ldap] [ldap]
use_pool=False
pool_retry_delay=0.1
url=ldap://foo url=ldap://foo
auth_pool_size=100
auth_pool_connection_lifetime=60
user=cn=foo,dc=example,dc=com user=cn=foo,dc=example,dc=com
pool_connection_timeout=-1
use_auth_pool=False
pool_connection_lifetime=600
pool_size=10
pool_retry_max=3
EOC EOC
end end
@ -371,17 +362,8 @@ EOC
it_behaves_like 'a_valid_configuration', <<-EOC it_behaves_like 'a_valid_configuration', <<-EOC
[ldap] [ldap]
pool_retry_delay=0.1
url=ldap://bar url=ldap://bar
user=cn=bar,dc=test,dc=com user=cn=bar,dc=test,dc=com
use_pool=False
pool_retry_max=3
pool_size=10
auth_pool_size=100
auth_pool_connection_lifetime=60
use_auth_pool=False
pool_connection_lifetime=600
pool_connection_timeout=-1
EOC EOC
end end
end end