Allow mysql haproxy stanza do be customized
We introduce a new tripleo::haproxy parameter called mysql_custom_listen_options which can be used to customize mysql listen options in haproxy's config. Tested as follows: parameter_defaults: ExtraConfig: tripleo::haproxy::haproxy_default_timeout: - 'http-request 10s' - 'queue 2m' - 'connect 10s' - 'client 5m' - 'server 5m' - 'check 10s' tripleo::haproxy::cinder::options: bind-process: 2 tripleo::haproxy::glance_api::options: bind-process: 2 tripleo::haproxy::mysql_custom_listen_options: bind-process: 2 Observed that haproxy's mysql stanza had: listen mysql bind 172.17.1.91:3306 transparent bind-process 2 option tcpka option httpchk Before this patch this was not the case and the tripleo::haproxy::<mysql>::options just got ignored. Closes-Bug: #1858775 Change-Id: Ia0ecca5b54c1ca51898035e641665150dbdac9f7 (cherry picked from commitc42c5aa678
) (cherry picked from commit64951b5c12
)
This commit is contained in:
parent
41764cbde1
commit
45a4a61114
@ -310,6 +310,10 @@
|
|||||||
# and if mysql cluster checking is disabled, the member options will be: "union($haproxy_member_options, ['backup'])"
|
# and if mysql cluster checking is disabled, the member options will be: "union($haproxy_member_options, ['backup'])"
|
||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
|
# [*mysql_custom_listen_options*]
|
||||||
|
# Hash to pass to the mysql haproxy listen stanza to be deepmerged with the other options
|
||||||
|
# Defaults to {}
|
||||||
|
#
|
||||||
# [*rabbitmq*]
|
# [*rabbitmq*]
|
||||||
# (optional) Enable or not RabbitMQ binding
|
# (optional) Enable or not RabbitMQ binding
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
@ -654,6 +658,7 @@ class tripleo::haproxy (
|
|||||||
$mysql_clustercheck = false,
|
$mysql_clustercheck = false,
|
||||||
$mysql_max_conn = undef,
|
$mysql_max_conn = undef,
|
||||||
$mysql_member_options = undef,
|
$mysql_member_options = undef,
|
||||||
|
$mysql_custom_listen_options = {},
|
||||||
$openshift_master = hiera('openshift_master_enabled', false),
|
$openshift_master = hiera('openshift_master_enabled', false),
|
||||||
$rabbitmq = false,
|
$rabbitmq = false,
|
||||||
$etcd = hiera('etcd_enabled', false),
|
$etcd = hiera('etcd_enabled', false),
|
||||||
@ -1367,7 +1372,7 @@ class tripleo::haproxy (
|
|||||||
}
|
}
|
||||||
haproxy::listen { 'mysql':
|
haproxy::listen { 'mysql':
|
||||||
bind => $mysql_bind_opts,
|
bind => $mysql_bind_opts,
|
||||||
options => $mysql_listen_options,
|
options => deep_merge($mysql_listen_options, $mysql_custom_listen_options),
|
||||||
collect_exported => false,
|
collect_exported => false,
|
||||||
}
|
}
|
||||||
haproxy::balancermember { 'mysql-backup':
|
haproxy::balancermember { 'mysql-backup':
|
||||||
|
Loading…
Reference in New Issue
Block a user