puppet-tripleo/spec/fixtures
Michele Baldessari 97d501251e Give horizon's stanza in haproxy a per-server cookie
Currently our haproxy.cfg stanza for horizon looks like the following:
server overcloud-controller-0.internalapi.localdomain 172.17.0.22:80 check cookie overcloud-controller-0 fall 5 inter 2000 rise 2
server overcloud-controller-1.internalapi.localdomain 172.17.0.25:80 check cookie overcloud-controller-0 fall 5 inter 2000 rise 2
server overcloud-controller-2.internalapi.localdomain 172.17.0.12:80 check cookie overcloud-controller-0 fall 5 inter 2000 rise 2

We need to make sure that the cookie is set the same as the server:
server overcloud-controller-0.internalapi.localdomain 172.17.0.22:80 check cookie overcloud-controller-0.internalapi.localdomain fall 5 inter 2000 rise 2
server overcloud-controller-1.internalapi.localdomain 172.17.0.25:80 check cookie overcloud-controller-1.internalapi.localdomain fall 5 inter 2000 rise 2
server overcloud-controller-2.internalapi.localdomain 172.17.0.12:80 check cookie overcloud-controller-2.internalapi.localdomain fall 5 inter 2000 rise 2

The problem here is that the cookie is being inserted into the response
by haproxy so that we have session persistence. When logging to horizon
we want the session to be persistent and go to the same backend server.
When haproxy sees a match for the cookie, it does just that. The cookie
value will should match the server name. Prior to this fix
each server was matching on the same cookie ($::hostname) which is not
correct.

Tested by connecting to horizon's VIP and shutting off horizon on each
controller node one at the time. Observed that after each stop, the
correct cookie from the remaining servers was sent to the browser.

Closes-Bug: #1738453
Change-Id: Ieb9cf3c6a8373df288a73ff2dacfc9d0b09e675a
2017-12-22 19:41:55 +00:00
..
hieradata Give horizon's stanza in haproxy a per-server cookie 2017-12-22 19:41:55 +00:00
hiera.yaml Add cinder profile spec tests 2016-12-05 08:26:55 -07:00