Commit Graph

28 Commits

Author SHA1 Message Date
Gabriel Cocenza 1c9e662d78 Add support for HAProxy L7 checks
This change adds the haproxy options if defined by the
charm class to enable HTTP checks to the HAProxy
configuration, instead of the default TCP connection
checks.

options.ssl check if the environment is using http or
https mode. We disable certificate verification because
we are only interested in the health of the service.

Fix for tox4 compability

Closes-Bug: #1880610
Change-Id: Ie091fdfe560b6a060f0c29c6b92a99f5e564eddf
2023-02-03 18:19:20 -03:00
Edward Hope-Morley e0f700eacb Add service_type to keystone template
Related-Bug: #1965967
Change-Id: I7c27d404b042eb2bef09e25ca24ac9c093709172
2022-04-01 12:07:40 +01:00
Nobuto Murata 5999eeaa5d Align haproxy logging config with charm-helpers
The previous config didn't actually log anything, and it has been fixed
for classic OpenStack API charms through charm-helpers. We need to
update layer-openstack as well to reflect those changes to reactive
OpenStack API charms.

Closes-Bug: #1697002
Related-Bug: #1940037
Change-Id: I523369673471f63346428f7f739a2429aa5084b3
2021-10-15 18:14:15 +09:00
Nobuto Murata 1ff51a9bf3 Ease KeepAliveTimeout in line with keystoneauth1.session.Session
Apache2's default value for KeepAliveTimeout is 5 seconds, which is okay
for general web-page serving use cases. However, sessions and connection
pools created by keystoneauth1.session.Session can be terminated
unnecessarily during multiple API calls in a session due to the short
KeepAliveTimeout.

Let's ease KeepAliveTimeout to 75 seconds, which is fairly standard for
API services behind a reverse proxy since it's the default value of
nginx.

Closes-Bug: #1947010
Change-Id: I752a836676d895ef783362810ed6764980e8574b
2021-10-14 09:50:25 +09:00
Nicolas Bock 91e6caf3be
Use the project_name from the identity_service
Currently the template hardcodes the `project_name` to `services`
which is not necessarily correct. Instead the template should use the
`identity_service.service_tenant`.

Closes-Bug: #1908945
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
Change-Id: Idd2a7c436f5448505bdfe5a53738a8e2071ed272
2020-12-23 10:28:14 -07:00
Nobuto Murata 0a24820971 Refresh cipher suites and protocols
The last update was 2016, and it's time to drop TLSv1 and TLSv1.1 as the
base configuration recommended by Mozilla.
https://wiki.mozilla.org/Security/Server_Side_TLS

This is equivalent to a charm-helper's change:
27d6ceb385

Change-Id: Ic7c3751d5cfce33517072bfca865e03f6f84f423
Closes-Bug: #1886630
2020-08-24 11:37:22 +09:00
Corey Bryant c44ae96eff Add section-placement
The placement config may be useful among more than one charm as
more services start to use the placement service. This patch adds
a single source of placement sectional config.

Change-Id: Id99e750f7b43dd0c893790eaa6fb79f7ce064f12
Related-Bug: 1850691
2019-10-31 18:50:23 +00:00
Frode Nordahl 15c2ae30bb
Use ``uri`` property
Move workdir to avoid charm build error in gate test.  Move built
artifact back so CI can inspect it. (The layer build-only job in
CI should get an update to cope with this itself)

Change-Id: Icee40b83e6924a6adc9ee1f97eff04522121d5fa
Closes-Bug: #1823729
2019-04-08 20:15:17 +02:00
David Ames cb4d058c0b Update deprecated rabbitmq messaging configuration
Current versions of OpenStack use the transport url rather than
rabbit_hosts and various other configuration settings.

Adding a new template for transport url and current
oslo-messaging-rabbit settings.

Allow the setting ssl_ca at the OpenStack principle layer.

Depends-On: Ie17b481bce3e3bfdf71b15ca7667f8688739d608
Change-Id: I6bb56a59cd65310d644aa25ae203996b22ec4b4e
Partial-Bug: #1807233
2018-12-06 11:35:40 -08:00
Zuul 2fc0f3e898 Merge "Support service_domain for reactive charm" 2018-07-12 16:08:19 +00:00
Nobuto Murata 2d4e6c8fa5 Enable proxy header parsing
Ensure that oslo.middleware parses any proxy information
forwarded from haproxy/apache with regards to protocol;
this ensures that https connections are correctly detected.

Change-Id: I16a9e8a74cdf6c56ad64902343f79b0ed51ccb6f
Closes-Bug: 1758675
2018-06-28 13:10:00 +09:00
Seyeong Kim 2de0033f2a Support service_domain for reactive charm
Hard coded default domain causes problem sometimes
Adding code for supporting service_domain
Please note that each charm using
layer openstack charm also need to be fixed
if you want to use service_domain instead of default

Change-Id: I1d56359a64c23019151c9c9186ca0c7374735536
2018-06-27 15:25:51 +09:00
Jakub Rohovsky 9ce9db2466 This patch enables haproxy stats by properly listening on address:port
Change-Id: Ie285fcc34cda6c206dd7bef47faf1874c7ff93c4
Closes-Bug: 1737720
2017-12-12 13:35:53 +01:00
David Ames bb4f9011da Update HAProxy default timeout values
The default HAProxy timeout values are fairly strict. On a busy cloud
it is common to exceed one or more of these timeouts. The only
indication that HAProxy has exceeded a timeout and dropped the
connection is errors such as "BadStatusLine" or "EOF." These can be
very difficult to diagnose when intermittent.

This change updates the default timeout values to more real world
settings. These values have been extensively tested in ServerStack.
Configured values will not be overridden.

Change-Id: I1f0167002fdc1e9e14eaa9ed9a6a365173a3406e
2017-12-11 10:28:24 -08:00
Tytus Kurek 7c752b0216 Enable addition of proper headers in apache2
This patchset implements necessary actions which are required to
properly set headers when using SSL.

Change-Id: I8cf4c048835b85c0845083768ec2d66e940cb15f
Closes-Bug: #1736417
2017-12-08 11:40:44 +01:00
Tytus Kurek c50110cf9b Enable IPv6 check in haproxy template file
This patchset adds IPv6 check to the haproxy template file.

Change-Id: Ib35dd1ac17f38aadf8c1ee3ce182ceca9a6f9316
Depends-On: I1e7329323cbe4ea9d2d79e4196690efa015aa0f4
Closes-Bug: #1719280
2017-11-02 11:19:05 +01:00
ritesh.arya a44ee453c3 Improve Python 3 compatibility
use dict.items() instead of dict.iteritems() for python 3 compatibility

Change-Id: If2319978ba1ca8074a07330140bfd4818ad1bb43
2017-08-21 22:49:34 +00:00
David Ames 925889c8ea Dual Stack VIPs
Enable dual stack IPv4 and IPv6 VIPs on the same interface.
HAProxy always listens on both IPv4 and IPv6 allowing connectivity
on either protocol.

Change-Id: I3079b25ba5ad51a61288519e4c78e0ae729d3dfa
2017-08-17 16:18:08 -07:00
Liam Young fe81a38382 Update/add templates for deploying Memcache
Add template for memcache config and amend keystone auth token
config fragment to point at memcache server if one is available

Add metadata.yaml to satisfy charm proof

Change-Id: I2c50fcb261e70648f5985c9e927ff58741877470
2017-01-04 14:59:37 +00:00
Jenkins 9c90f13164 Merge "Point kombu_ssl_ca_certs at CA File" 2016-08-02 08:45:14 +00:00
Liam Young 7f3c3cf9db Fix section-keystone-authtoken template
The section-keystone-authtoken template is not using the adapter
namespaces nor does it support keystone v3

Change-Id: Ic6f66feb123c131334245f499904dbd23937ce94
2016-08-01 13:40:48 +00:00
Liam Young c89885a842 Point kombu_ssl_ca_certs at CA File
The value of the kombu_ssl_ca_certs configuration option should be
the CA file rather than the cert itself

Change-Id: I39c323112fc65583242d22c0b6061fe825b9be50
2016-07-29 11:25:38 +00:00
Liam Young eb2f28539e Tidy/Fix Apache template
Remove old template for apache pre-2.4 and update
openstack_https_frontend.conf to match adapter parameters

Add tox targets to placate CI

Change-Id: I03acf7e3e524b2a15756a07e0a2d13ed88eaefac
2016-07-13 08:29:24 +00:00
Liam Young fee6b90f50 Update haproxy template and temporarily point at fork of charms.openstack 2016-06-02 11:07:49 +00:00
Liam Young 67bd1bad94 Tidyup database template and adapter 2015-12-14 13:36:45 +00:00
Liam Young f9290a97c0 Ad non-oslo db template 2015-12-11 14:21:15 +00:00
Liam Young 909bd71fb5 fixes 2015-12-11 10:45:04 +00:00
Liam Young 457d66cbff Add templates from charm-helpers and new section-database 2015-12-10 10:12:07 +00:00