Merge "Make nova_metadata use source LB strategy"

This commit is contained in:
Zuul 2020-10-24 01:16:20 +00:00 committed by Gerrit Code Review
commit 4a44a1ba59
2 changed files with 7 additions and 2 deletions

View File

@ -1033,6 +1033,10 @@ class tripleo::haproxy (
mode => 'http',
service_network => $nova_metadata_network,
member_options => union($haproxy_member_options, $internal_tls_member_options),
listen_options => merge($default_listen_options, {
'balance' => 'source',
'hash-type' => 'consistent',
}),
}
}

View File

@ -210,17 +210,18 @@ describe 'tripleo::haproxy' do
end
end
describe "source-based sticky sessions w/o use of consistent hashing" do
describe "source-based sticky sessions" do
before :each do
params.merge!({
:etcd => true,
:ceph_grafana => true,
:ceph_dashboard => true,
:nova_novncproxy => true,
:nova_metadata => true,
})
end
%w(etcd ceph_grafana ceph_dashboard nova_novncproxy).each do |svc|
%w(etcd ceph_grafana ceph_dashboard nova_novncproxy nova_metadata).each do |svc|
it 'should configure haproxy ' + svc + ' endpoint' do
is_expected.to contain_haproxy__listen(svc)
p = catalogue.resource('tripleo::haproxy::endpoint', svc).send(:parameters)