Merge "Give horizon's stanza in haproxy a per-server cookie"

This commit is contained in:
Zuul 2017-12-26 13:47:21 +00:00 committed by Gerrit Code Review
commit c952df72cc
3 changed files with 27 additions and 6 deletions

View File

@ -144,11 +144,13 @@ class tripleo::haproxy::horizon_endpoint (
mode => 'http',
collect_exported => false,
}
haproxy::balancermember { 'horizon':
listening_service => 'horizon',
ports => $backend_port,
ipaddresses => $ip_addresses,
server_names => $server_names,
options => union($member_options, ["cookie ${::hostname}"]),
hash(zip($ip_addresses, $server_names)).each | $ip, $server | {
haproxy::balancermember { "horizon_${ip}_${server}":
listening_service => 'horizon',
ports => $backend_port,
ipaddresses => $ip,
server_names => $server,
options => union($member_options, ["cookie ${server}"]),
}
}
}

View File

@ -80,6 +80,21 @@ describe 'tripleo::haproxy' do
end
end
describe "horizon" do
before :each do
params.merge!({
:horizon => true,
})
end
it 'should configure haproxy horizon endpoint' do
is_expected.to contain_class('tripleo::haproxy::horizon_endpoint')
is_expected.to contain_haproxy__balancermember('horizon_127.0.0.1_controller-1').with(
:options => ['check', 'inter 2000', 'rise 2', 'fall 5', 'cookie controller-1'],
)
end
end
describe "override maxconn without clustercheck" do
before :each do
params.merge!({

View File

@ -48,6 +48,10 @@ memcached_node_ips:
# octavia related items
octavia::rabbit_password: 'password'
horizon::secret_key: 'secrete'
horizon_node_ips:
- '127.0.0.1'
horizon_node_names:
- 'controller-1'
#Neutron related
neutron::rabbit_password: 'password'
# Pacemaker related