156 Commits

Author SHA1 Message Date
Zuul
e68abd6abf Merge "Add Octavia API endpoint to haproxy" 2017-11-29 15:08:32 +00:00
Zuul
357b619014 Merge "Change haproxy check to tcpka for ec2_api" 2017-11-27 18:39:53 +00:00
Brent Eagles
c410f608ca Add Octavia API endpoint to haproxy
This patch adds an endpoint for Octavia API to haproxy.

Closes-Bug: #1728589

Change-Id: I978b83fa5f3900d2f09c2affc59e90e150a42892
2017-11-23 08:15:34 -03:30
Cédric Jeanneret
323cd64c58 Added new parameter: $activate_httplog
This allows to get the full HTTP log (and TCP if not HTTP) from HAProxy,
in case you need any debug from that central point.

In case you want timers for those entries, you might want to use the
already present "$haproxy_globals_override" parameter and set its
content to:
{ 'log' => '/dev/log local0 debug'  }

Change-Id: I4667317cbd453875585521b22b0ccbdb208f5353
Closes-Bug: 1733801
2017-11-22 21:33:38 +01:00
Zuul
2b80eeb55e Merge "Add resource to create haproxy endpoints dynamically" 2017-11-22 19:33:23 +00:00
Zuul
2045d83811 Merge "Add kubernetes API to haproxy LB configuration" 2017-11-21 20:21:52 +00:00
Steven Hardy
5cac7936ad Add kubernetes API to haproxy LB configuration
This is to enable our existing haproxy & vip management to work as an
external loadbalancer for kubernetes when it's deployed as part of the
overcloud.

Change-Id: I89c63720921db5e9c63536645694f2c35ef8b2f1
2017-11-17 15:09:49 +00:00
Zuul
648c5a91b3 Merge "Add TLS for ec2api metadata service" 2017-11-15 21:17:27 +00:00
Zuul
1c3f8a9263 Merge "Add TLS for ec2api service" 2017-11-13 11:26:25 +00:00
Zuul
11521f29c4 Merge "HAproxy should get full response from ironic-inspector" 2017-11-11 23:40:30 +00:00
Rajesh Tailor
df9f68f206 Add TLS for ec2api metadata service
This adds a TLS proxy in front of it so it serves TLS in the
internal network.

bp tls-via-certmonger

Change-Id: Id7d487abb65cf17cd65626e582bf4ff950b4395c
2017-11-08 11:45:47 +05:30
Sven Anderson
b8456e5cee Change haproxy check to tcpka for ec2_api
EC2-API always returns HTTP code 400 if not properly authorized,
therefore httpchk is not working, since it's expecting an 200 OK.
Changing to tcpka for now, until EC2-API implements a URL that is
suitable for healthchecks.

Change-Id: Ic8ec8cdd4dc59e3768c06912ceb8a91b425b0a06
2017-11-03 18:03:39 +01:00
Rajesh Tailor
24a3e20eed Add TLS for ec2api service
This adds a TLS proxy in front of it so it serves TLS in the
internal network.

bp tls-via-certmonger
Change-Id: I24d990eccf7affd5f3899338ac96d02d2d47460e
2017-11-01 18:30:11 +05:30
Juan Antonio Osorio Robles
7ff44712c1 Add resource to create haproxy endpoints dynamically
With this resource we can add the values needed for haproxy via t-h-t,
instead of having everything in the haproxy manifest. Right now nothing
is using it, but subsequent and per-service changes will come.

Change-Id: I8ab49c0b8d8f42ce68c0c7fe3ef8067a7d0da3c0
2017-10-09 09:12:48 +02:00
Cédric Jeanneret
e62efd0782 Allow to override HAProxy global options.
You can either append new options or override existing one.

This can be particularly useful in case you want to set your own log
options, for example.

Change-Id: I19005b7e70e624d3b64b6c2ac8eaadfdec3944db
Closes-Bug: 1721246
2017-10-06 08:35:24 +02:00
Cédric Jeanneret
33479418ee Added new parameter for HAProxy configuration
This allow to set the socket access level to admin instead of default
"user".
This "admin" access adds the capability to interact with HAproxy in
order to manage its configuration, at least temporarly.

This changes keeps the default "user" access level, as "admin" might
break things if misused.

Change-Id: I1a4612b9f8aacc410b48a04dac3bf300bbb0e08e
Closes-bug: #1716692
2017-09-12 18:38:19 +02:00
Martin André
2d1d7875aa Use TLS proxy for Redis' internal TLS
This uses the tls_proxy resource in front of the Redis server when
internal TLS is enabled.

bp tls-via-certmonger

Co-Authored-By: Juan Antonio Osorio Robles <jaosorior@redhat.com>
Change-Id: Ia50933da9e59268b17f56db34d01dcc6b6c38147
2017-08-31 05:27:55 +00:00
Lukas Bezdicka
93ae3c9595 HAproxy should get full response from ironic-inspector
Ironic-inspector spams the logs with errors if we don't get full
response. If ironic-inspector answers something with 200 it should
be fine.

Change-Id: I464cdd139fb93ce7cd19fc5ac5960f302ae1a9f4
Closes-Bug: #1691971
Resolves: rhbz#1477663
2017-08-24 00:15:03 +02:00
Pradeep Kilambi
5064677dda Fix panko port to match tht
In templates we use 13977 as the port for panko. The
old 13779 is reserved for trove so it conflicts.

Closes-bug: #1712566

Change-Id: I77444199eef6c2b9abbd819829b4fea2d698e2db
2017-08-23 12:55:21 +00:00
Jenkins
c34163c79b Merge "Add TLS for nova metadata service" 2017-08-19 03:06:40 +00:00
Jenkins
e04633fab8 Merge "Create separate resource for HAProxy horizon endpoint" 2017-08-18 15:23:27 +00:00
Juan Antonio Osorio Robles
264f22835a Add TLS for nova metadata service
This adds a TLS proxy in front of it so it serves TLS in the internal
network.

bp tls-via-certmonger

Change-Id: I97ac2da29be468c75713fe2fae7e6d84cae8f67c
2017-08-17 17:29:32 +00:00
Juan Antonio Osorio Robles
3959f24862 Create separate resource for HAProxy horizon endpoint
This removes clutter from the main haproxy manifest and allows TLS in
the internal network as well. Trying to keep the previous behavior.

bp tls-via-certmonger-containers
Change-Id: I1a68771cc7be7fb2b32abbad81db7890bd2c5502
2017-08-17 13:29:03 +00:00
Juan Antonio Osorio Robles
5222b8d920 Remove extra keystone admin haproxy listen and allow TLS
The current code exposes an unused public listen directive in HAProxy
for the keystone admin endpoint. This is not ideal and should be
removed, as it exposes the service unnecessarily. We should stick to
just exposing it to the ctlplane network as is the default.

If folks really need to expose it to the public network, they can do so
by modifying the ServiceNetMap through t-h-t and setting the keystone
admin endpoint's network to external.

Now, for "single" or "internal" haproxy endpoints, this adds the ability
to detect if they're using the external network, and thus use TLS on it.
Which is something a deployer would want if they exposed the keystone
admin endpoint in such a way.

Change-Id: I79563f62fd49a4f7654779157ebda3c239d6dd22
Closes-Bug: #1710909
Closes-Bug: #1639996
2017-08-16 08:07:00 +03:00
Jenkins
ee2a53afb1 Merge "Enable TLS for the HAProxy stats interface" 2017-07-31 19:32:33 +00:00
Jenkins
48ead62f6f Merge "Prevent haproxy to run iptables during docker-puppet configuration" 2017-07-31 15:26:19 +00:00
Juan Antonio Osorio Robles
e51e796920 Enable TLS for the HAProxy stats interface
This creates a new class for the stats interface and furtherly
configures it to also use the certificates that are provided by
certmonger (via the internal_certificates_specs variable).

Note that the already existing haproxy_stats_certificate still works and
will take precedence if it's set.

bp tls-via-certmonger

Change-Id: Iea65d91648ab13dbe6ec20241a1a7c95ce856e3e
2017-07-31 13:30:14 +00:00
Thomas Herve
01ae503525 Handle SSL options for Zaqar
This allows running Zaqar with SSL under Apache.

Change-Id: I4c68a662c2433398249f770ac50ba0791449fe71
2017-07-27 18:59:52 +00:00
Damien Ciabrini
50f160a148 Prevent haproxy to run iptables during docker-puppet configuration
When docker-puppet runs module tripleo::haproxy to generate haproxy
configuration file, and tripleo::firewall::manage_firewall is true,
iptables is called to set up firewall rules for the proxied services
and fails due to lack of NET_ADMIN capability.

Make the generation of firewall rule configurable by exposing a
new argument to the puppet module. That way, firewall management can
be temporarily disabled when being run through docker-puppet.

Change-Id: I2d6274d061039a9793ad162ed8e750bd87bf71e9
Partial-Bug: #1697921
2017-07-27 18:59:30 +00:00
Jenkins
152d224c73 Merge "Contrail: Fix controlplane/dataplane network asignments & enable optional dpdk" 2017-07-14 23:44:24 +00:00
Michael Henkel
8b9e2b3c6c Contrail: Fix controlplane/dataplane network asignments & enable optional dpdk
This patch will move the Contrail roles communication towards
OpenStack APIs from the public/external network to the
internal_api network. I will also add the option to enable
dpdk for Contrail.

Change-Id: Ia835df656031cdf28de20f41ec6ab1c028dced23
Closes-Bug: 1698422
2017-07-05 22:52:58 +02:00
Rob Crittenden
90eed9d6a0 Merge the nova HAproxy TLS options
This makes sure that we set the necessary options so HAProxy uses TLS
to contact nova.  It was commented out when nova was moved to not run
over httpd. Since that is no longer the case we can re-enable it.

Change-Id: I026a7dab30b00a4e93966f650f098c570b0b624b
Depends-On: Iac35b7ddcd8a800901548c75ca8d5083ad17e4d3
2017-06-28 15:50:40 -04:00
Jenkins
dc70e9dfbc Merge "Make enabling haproxy stats interface configurable" 2017-06-21 13:35:20 +00:00
Juan Antonio Osorio Robles
e1abfd7e6c Make enabling haproxy stats interface configurable
Some people might or might not want to enable it. So this makes it
configurable. It defaults to true as we were always deploying it before.

Change-Id: I8d2a08cdaf3e5ec3d1a69d4f95e57522508c8610
2017-06-20 18:50:12 +03:00
Mike Bayer
7e6924c436 Add maxconn parameter to MySQL / HAProxy
Allows configurability of maxconn as applies to
the MySQL section of the HAProxy config, both
for clustercheck and single node.

Also adds a new test for the haproxy class
overall to exercise options.

Change-Id: I023682dd5e85cc78d6dd3e5214a53863acc4f303
2017-06-20 10:48:43 -04:00
Jenkins
65fe0404ae Merge "Fix the port for Panko API" 2017-06-19 18:29:47 +00:00
Juan Antonio Osorio Robles
192463755b For http service endpoints always redirect to https
If public TLS is enabled, this sets as default that services should
always redirect to https.

Change-Id: I19b9d07ac8925366ed27fefcaca4fdb9a9ab1b37
2017-06-16 12:53:59 +03:00
Jenkins
bf48a735ca Merge "Remove condition to match hdr(host) in haproxy redirect rule" 2017-06-14 09:43:03 +00:00
Ryan O'Hara
2606a4e66f Remove condition to match hdr(host) in haproxy redirect rule
The horizon proxy should redirect all HTTP requests to HTTPS,
regardless of the 'Host' field in the header. The current rule will
cause haproxy to redirect HTTP requests if the 'Host' field contains
the public virtual IP address. It will not redirect if the 'Host'
field contains a hostname, FQDN, etc.

Change-Id: I6c8f58a30f97cdf4c668734793197ea976297733
Signed-off-by: Ryan O'Hara <rohara@redhat.com>
2017-06-12 08:23:09 +00:00
Juan Antonio Osorio Robles
c8d2a1133e Use CRL for HAProxy
This sets up the CRL file to be triggered on the certmonger_user
resource. Furtherly, HAProxy uses this CRL file in the member options,
thus effectively enabling revocation for proxied nodes.

So, if a certificate has been revoked by the CA, HAProxy will not proxy
requests to it.

bp tls-via-certmonger

Change-Id: I4f1edc551488aa5bf6033442c4fa1fb0d3f735cd
2017-06-08 16:57:18 +03:00
ZhongShengping
6b0084c85d Fix the port for Panko API
The port used for Panko is conflicts with Trove[1]. According to the
official documentation[2] this should be 8777. The 8777 port has been
occupied by ceilometer. So set the panko api port to 8977.

[1]https://github.com/openstack/trove/blob/master/etc/apache2/trove#L20
[2]https://docs.openstack.org/developer/panko/install/manual.html#installing-the-api-server

Change-Id: I5ccfc97765fc8b8bf9686b2451eda9c44c77dffc
Closes-Bug: #1691283
Depends-On: I53b286d1d6466b574fdb286cc45f3138f96dff59
2017-06-08 08:56:51 +08:00
Babu Shanmugam
48a6a0985d Pacemaker support for OVN DB servers
This patch enables OVN DB servers to be started in master/slave
mode in the pacemaker cluster.

A virtual IP resource is created first and then the pacemaker OVN OCF
resource - "ovn:ovndb-servers" is created. The OVN OCF resource is
configured to be colocated with the vip resource. The ovn-controller and
Neutron OVN ML2 mechanism driver which depends on OVN DB servers will
always connect to the vip address on which the master OVN DB servers
listen on.

The OVN OCF resource itself takes care of (re)starting ovn-northd service
on the master node and we don't have to manage it.

When HA is enabled for OVN DB servers, haproxy does not configure the OVN DB
servers in its configuration.

This patch requires OVS 2.7 in the overcloud.

Co-authored:by: Numan Siddique <nusiddiq@redhat.com>
Change-Id: I9dc366002ef5919339961e5deebbf8aa815c73db
Partial-bug: #1670564
2017-06-01 11:54:53 +05:30
Jenkins
baecff6c3c Merge "Enable internal network TLS for etcd" 2017-04-25 17:33:53 +00:00
Jenkins
2abcfb46d2 Merge "Allow to configure haproxy daemon's status" 2017-04-21 13:39:13 +00:00
Michele Baldessari
84d3a82476 Allow to configure haproxy daemon's status
Currently we hard-code the fact that haproxy starts as a daemon.
When running haproxy in a container we need this to be configurable
because the haproxy process will be pid number 1.

We are not changing the current semantics which have the 'daemon'
option always set, but we are allowing its disabling.

Change-Id: I51c482b70731f15fee4025bbce14e46a49a49938
2017-04-19 12:58:35 +02:00
Juan Antonio Osorio Robles
c372d01a94 Haproxy: When using TLS everywhere, use verifyhost for the balancermembers
This checks that the subjectAltName in the backend server's certificate
matches the server's name that was intended to be used.

Change-Id: If1c61e1becf9cc84c9b18835aef1eaaa8c0d4341
2017-04-18 14:51:03 +03:00
Emilien Macchi
6cb95e6a69 HAproxy/heat_api: increase timeout to 10m
Default timeout is 2min but it doesn't reflect the rpc_response_timeout
value that we set in THT and instack-undercloud, which is 600 (10 min).

In some cases (in low-memory environments), Heat needs more than 2
minutes to reply to the client, when deploying the overcloud.
It makes sense to increase the timeout to the value of rpc_timeout to
give a chance to Heat to reply to the client, otherwise HAproxy will
kill the connection and send 504 to the client.

Depends-On: I9669d40d86d762101734704fcef153e360767690
Change-Id: I32c71fe7930c8798d306046d6933e4b20c22740c
Related-Bug: 1666072
2017-04-17 21:07:36 +00:00
Feng Pan
60d187ee0b Enable internal network TLS for etcd
bp secure-etcd

Change-Id: I0759deef7cbcf13b9056350e92f01afd33e9c649
Signed-off-by: Feng Pan <fpan@redhat.com>
2017-04-12 08:28:02 +00:00
Juan Antonio Osorio Robles
39568b17ad etcd: Make HAProxy terminate TLS connections
When TLS is enabled for the internal network, HAProxy needs to handle
etcd's TLS termination. Else it will use plain text.

bp secure-etcd

Change-Id: I20651240edcff0953741d4e8e01fa9a7ab185863
2017-04-10 15:08:18 -04:00
Jenkins
b8a11a5d80 Merge "Adding listen_options for Contrail Webui https in haproxy" 2017-04-07 18:45:48 +00:00