Commit Graph

229 Commits

Author SHA1 Message Date
Gregory Thiemonge a81cf552ce Added olso_middleware.sizelimit support
Change-Id: I484e4a88993196f63c8c9285dc2772507cc4d8c5
2023-11-28 07:10:53 -05:00
Michael Johnson 32988c0ae8 Fix example policy file system-reader role
This patch fixes the sample keystone_default_roles-policy.yaml file to use admin instead of reader for the system-reader role.

Change-Id: I914aaa2eb57cf4c7206909e8ea17af1033c54965
2023-02-23 18:24:23 +00:00
Dmitriy Rabotyagov f5ac714a7b Pass config to castellan
Currently castellan can't be configured through octavia.conf as
conf is not passed while initializing backend.

Also document castellan configuration options in reference.

Change-Id: I30b81866989c22b94fb77e62e7abd180f0f0af50
2022-09-30 09:18:00 +02:00
Takashi Kajinami abf7b9efcf Add conf file for oslo-config-generator
This change introduces the config file for the oslo-config-generator
command, so that users can easily generate octavia.conf.example without
tox.

Note this change adds parameters of oslo.policy and oslo.middleware
which were missing previously.

Change-Id: I5ea921cf8d63b28c5143f95dbb47802d5018d7a4
2022-09-04 05:14:16 +09:00
Adam Harwell 1d19b702b1 Failover stop threshold / circuit breaker
Stop failovers if the count of simultaneously failed
amphora reaches the number configured in the new
failover_threshold option.
This may prevent large scale accidental failover events,
like in the case of network failures or read-only
database issues.

Story: 2005604
Task: 30837
Co-Authored-By: Tatsuma Matsuki <matsuki.tatsuma@jp.fujitsu.com>
Co-Authored-By: Tom Weininger <tweining@redhat.com>

Change-Id: I0d2c332fa72e47e70d594579ab819a6ece094cdd
2022-09-02 17:15:59 +02:00
Zuul 6e24fa6bd3 Merge "Add event notifications for load balancers." 2022-08-18 11:50:37 +00:00
Spencer Harmon 70257eb6b3 Add event notifications for load balancers.
This patch creates tasks for load balancer notifications and adds them to the amphora loadbalancer create/delete/update flows.

Change-Id: I287d89cd83e91473f1375788c969521aa58ca567
2022-07-29 10:07:02 -05:00
Michael Johnson 5ab6e3d30f Move system scoped secure-RBAC to separate file
This patch moves the system scope configuration in the policy override example files out to a separate override file. This way the new default roles can be enabled independently of system scoped tokens. This helps us align to the changes in the secure-RBAC spec[1].

[1] https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html

Change-Id: I1b41780f3ca84ceca563d668ae8bb40011a60bf4
2022-07-15 23:43:07 +00:00
Tom Weininger 829e44acbd Make amphora timezone configurable
The new amp_timezone option allows to adjust the timezone of
amphora using cloud-init.

Change-Id: I2f49cbb7f8d99ba2da878bbfc7081a3cc3b3aa07
2022-05-06 12:13:41 +02:00
Michael Johnson f97c826fed Add a Grafana dashboard for Octavia load balancers
This patch adds a Grafana dashboard for Octavia load balancers that can
be imported into Grafana.

Change-Id: I6d4de38dd44adecc677c637a25233494065ba3fb
2022-02-28 17:27:20 +00:00
Michael Johnson 0d9674bd87 Add the PROMETHEUS protocol to listeners
This patch adds a new protocol for listeners called "PROMETHEUS" that exposes
a Prometheus endpoint. This allows detailed metrics collection from Octavia
load balancers.

Change-Id: I3e27e4e57ad955bcd7728426c91f05171a46ef7f
2022-02-22 01:57:53 +00:00
Gregory Thiemonge 80acf3bea8 Fix typo in config option name
[haproxy_amphora]/active_connection_rety_interval
is renamed to active_connection_retry_interval.

A config option with the typo still exists as a deprecated alias, so it
doesn't break compatibility with old config files.

Change-Id: Iafc479f1628fd3959c3f0ef83edb7a739823fb91
2022-01-05 08:00:24 +01:00
Gregory Thiemonge 5dd7ad9ad8 Add generic network interface management in the amphora
Handle network configuration using Octavia tools.

amphora-interface configures network interfaces inside the amphora
using pyroute2 and a set of json files for persistent configuration in
the /etc/octavia/interfaces/ directory.

Story: 2005235
Task: 30019

Depends-On: https://review.opendev.org/806558

Change-Id: I5360c8246cd39f90eb7104a883f87c0042d146c4
2021-08-31 17:21:37 +02:00
Zuul c16a0b78b5 Merge "Fix comment for the ca_certificates_file opt" 2021-05-05 12:40:11 +00:00
Gregory Thiemonge 815a283823 Spare pool removal
Spare pool feature was deprecated in Victoria, we decided to remove it
during the Xena release cycle.

Change-Id: I830c6a4c49fa47105f788cf99a0f775e5dbdcaea
2021-04-28 09:10:09 +02:00
Thomas Goirand ee0da827b1 Fix comment for the ca_certificates_file opt
The directive [certificates]/ca_certificates_file currently has a
confusing comment. This tries to fix it and make it more easy for
Octavia operators to configure the directive.

Change-Id: I99ce408ec886820c056b69696b26be9521740f1c
2021-04-02 16:40:08 +00:00
Michael Johnson 6c54eab5b5 Make /healthcheck cache results
The healthcheck endpoint should cache results to reduce the potential load on the backend systems being tested.
This patch adds the caching and a configuration setting for the interval
between cache refreshes.

Change-Id: Ic97a991437144f3a220d9b96839cec5b63565f8c
Story: 2008203
Task: 40987
2021-03-15 21:43:43 +00:00
Zuul 41ff3ee3f1 Merge "Add support for scoped tokens and default roles" 2021-03-10 02:55:08 +00:00
Michael Johnson a5f142c566 Add support for scoped tokens and default roles
This patch is the base patch to enable support for Keystone
scoped tokens[1] and default roles[2] in the Octavia API.

It strives to maintain backward compatibility and support for
Octavia Advanced RBAC roles.

[1] https://docs.openstack.org/keystone/latest/admin/tokens-overview.html#authorization-scopes
[2] https://docs.openstack.org/keystone/latest/admin/service-api-protection.html

Change-Id: I4443d4531dc97d14f8277024baa11ab43e87fb39
2021-03-08 19:33:35 +00:00
Carlos Goncalves dd3edb635b Add HTTP/2 to default lists of ALPN protocols
The two tested Linux distributions for Wallaby release (Ubuntu 20.04 and
CentOS 8) [1] provide a recent enough HAProxy version (>=2.0) that allow
us to add HTTP/2 to the default ALPN protocols list for listeners and
pools.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html

Change-Id: I998bea5e7bcdc28962f2f393e204791a0b519910
2021-03-05 13:23:43 +01:00
Gregory Thiemonge 2888f44e7b Add SCTP support in Amphora
Add SCTP support in the Amphora (with keepalived).
Add amphora-health-checker script for customized SCTP health checks
(INIT/INIT-ACK/ABORT).

Change-Id: I30997ae6cc6b8ec724f0e9dcfdfe49356b320ff4
Story: 2007884
Task: 40932
2021-01-29 13:58:39 +01:00
Carlos Goncalves d2d5fc80f8 Add ALPN support for TLS-enabled pools
ALPN is a TLS extension for application-layer protocol negotiation
within the TLS handshake [1].

This patch extends the Pool API to include a new 'alpn_protocols'
parameter. With this parameter, users can set an ALPN preference list
(descending order of preference) to be advertised by load balancer to
members.

This patch also adds HTTP/2 over TLS support to TLS-enabled pools to the
Amphora provider driver, although default the pool ALPN protocol list
configuration setting has HTTP/2 disabled similarly to the default
listener ALPN protocol list value added in Victoria release.

[1] https://tools.ietf.org/html/rfc7301

Change-Id: I91924486bab22601c15c538c8a5282ad8bc54700
2021-01-28 14:42:48 +01:00
Ann Taraday befa073495 Bump taskflow version
Taskflow 4.4.0 contains essential fix for jobboard behaviour on
Storage failure [1].

Also add jobboard_redis_sentinel parameter to allow usage sentinel
for Redis jobboard. Support of this also appear in 4.4.0 version.

[1] - https://docs.openstack.org/releasenotes/taskflow/unreleased.html#bug-fixes

Change-Id: I48245b3322b0f2e5f2c11594a15632501a7e4086
2020-09-10 14:12:39 +00:00
Zuul 9a732565e9 Merge "Refactoring amphora stats driver interface" 2020-09-09 02:10:53 +00:00
Zuul 49912974b7 Merge "Deprecate the Spares Pool feature for removal in X" 2020-09-09 00:44:19 +00:00
asingh12 5092597f6b Refactoring amphora stats driver interface
Previously the stats driver was responsible for parsing the health
message, which should have been done prior to passing the stats to the
driver interface.

Removed the driver interface for the health updater because it is core
Octavia functionality.

Stats drivers is now a singleton and can load multiple drivers.

Both the amphora health manager AND provider statistics should use the
new driver interface.

Co-Authored-By: Stephanie Djajadi <stephanie.djajadi@gmail.com>
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: I3a013aebd1eb89cd4f983fbf4f8ae8d6639548cd
2020-09-08 15:32:04 -07:00
Adam Harwell 29a2ec7187 Deprecate the Spares Pool feature for removal in X
Use of the spares pool was originally recommended to increase provisioning
speed, but since Nova's server groups do not support adding existing VMs,
Octavia cannot support use of the spares pool with the Active-Standby
topology. Since this is our recommended topology for production deployments,
and speed is less essential in development/testing environments (the
only place we could recommend the use of Single topology), the overhead of
maintaining spares pool support exceeds its theoretical usefulness.

Change-Id: I7375e9758c7ae80e2370189117e8e63c79446490
2020-09-08 14:29:58 -07:00
Carlos Goncalves a422e5a203 Introduce an image driver interface
With this image driver interface, we align our codebase with other
existing driver interfaces like compute, network and volume.

This interface also allows the amphora provider driver to check for
existence of tagged images at API level (e.g. amphora image tag
capability in Octavia flavors).

Change-Id: Id808c082808fafe1a1e004957ff47eca57f97ee8
2020-09-03 20:06:35 +00:00
Carlos Goncalves f3b5e6e147 Switch to live from noop drivers
The switch to live drivers ease greenfield deployments by not requiring
deployers to explicitly set live drivers. The switch also helps
deployers identify production-ready from experimental drivers.
Experimental features like volume and distributor remain defaulted to
their noop drivers.

This patch also fixes some tests that were not mocked properly.

Change-Id: I1e4e3c4f0e4142fa0d0d1ac895b10e2349d79c20
2020-08-28 20:51:45 +00:00
Carlos Goncalves a5f0524fd0 Add ALPN support for TLS-terminated HTTPS LBs
ALPN is a TLS extension for application-layer protocol negotiation
within the TLS handshake [1].

This patch extends the Listener API to include a new 'alpn_protocols'
parameter. With this parameter, users can set an ALPN preference list
(descending order of preference).

Presently, the amphora provider driver is limited to http/1.0 and
http/1.1 ALPN protocol IDs. Support for "h2" (HTTP/2 over TLS) depends
on HAProxy 2.0 or newer.

[1] https://tools.ietf.org/html/rfc7301

Change-Id: If08a8169498cdfaa75440e8971ba0caff45ac4c4
2020-08-27 13:19:52 +02:00
Zuul 2d97ebcd24 Merge "Allow amphorav2 to run without jobboard" 2020-08-25 22:47:04 +00:00
Zuul 13faf288e4 Merge "Fix memory consumption issues with default connection_limit" 2020-08-24 07:50:16 +00:00
Carlos Goncalves bb9b30be7e Allow amphorav2 to run without jobboard
This patch adds a new configuration setting to enable/disable jobboard
functionality in the amphorav2 provider. When disabled, the amphorav2
provider behaves similarly to the amphora v1 provider.

The default setting is jobboard disabled while jobboard remains an
experimental feature.

Change-Id: I063d832f5a049d7ae38378766200c7f82a35996d
2020-08-17 13:57:33 +00:00
Zuul c78a1b2c29 Merge "Add quota support to octavia's l7policy and l7rule" 2020-07-27 21:01:51 +00:00
Gregory Thiemonge f4305e036c Fix memory consumption issues with default connection_limit
With 1.8.x releases, haproxy consumes a lot of memory when
using 1,000,000 as default connection_limit.

This commit introduces a new configuration option for the Amphora
provider: [haproxy_amphora].default_connection_limit (defaulted to
50,000). This value is used when creating a listener with -1 (which is
the default) as connection_limit, or when unsetting connection_limit in
a listener.
Updating an existing listener by setting connection_limit to -1 also
sets it to default_connection_limit.

The global connection_limit for a load balancer is the sum of the
connection_limit of the listeners, but it cannot be over
HAPROXY_MAX_MAXCONN (which is still 1,000,000).

Story: 2007794
Task: 40046

Change-Id: Ibc525d9a046a5ab7f090a942459d80a2df66ae2e
2020-07-23 09:58:23 +02:00
Brian Haley 7890f0d999 Remove blacklist terminology in the Octavia tree
The configuration option tls_cipher_blacklist has been
deprecated and replaced by tls_cipher_prohibit_list.

Change-Id: I6152838c697e12d19b27343e3a0714e55ca52d88
2020-07-08 15:19:52 -04:00
Zuul b8a351092f Merge "Remove amp_image_id option" 2020-06-30 17:54:32 +00:00
Brian Haley f6a66d86d4 Remove deprecated status_update_threads option
It was marked for removal in the Stein cycle.

Change-Id: Ib82014f92eecbcfd96a4219f2de307e5631486cb
2020-06-29 21:51:01 -04:00
Zuul 179f00e839 Merge "Add minimum TLS version option in octavia.conf" 2020-06-29 22:47:36 +00:00
Carlos Goncalves 33d28b07c2 Remove amp_image_id option
This option entered deprecation in Mitaka and is long due to be removed.

Change-Id: Ide048da1c87a4e9bc6574b39e2cf6b96b4dfaf95
2020-06-23 19:54:20 +02:00
Zuul d8aceef0d5 Merge "Update the API audit map" 2020-06-21 16:23:51 +00:00
Zuul 3e765636c5 Merge "Fix API audit CADF audit map for failover action" 2020-06-21 16:22:44 +00:00
Michael Johnson 955bb88406 Refactor the failover flows
This patch refactors the failover flows to improve the performance
and reliability of failovers in Octavia.

Specific improvements are:
* More tasks and flows will retry when other OpenStack services are
  failing.
* Failover can now succeed even when all of the amphora are missing
  for a given load balancer.
* It will check and repair the load balancer VIP should the VIP
  port(s) become corrupted in neutron.
* It will cleanup extra resources that may be associated with a
  load balancer in the event of a cloud service failure.

This patch also removes some dead code.

Change-Id: I04cb2f1f10ec566298834f81df0cf8b100ca916c
Story: 2003084
Task: 23166
Story: 2004440
Task: 28108
2020-06-18 16:25:21 -07:00
Michael Johnson e77355714b Update the API audit map
Recent additions to the Octavia API did not update the Octavia API
CADF audit map. This patch corrects that by adding the new API
paths.

Change-Id: I22107317837e68e54a29f8a4051c464120b29809
2020-06-18 21:43:34 +00:00
Michael Johnson 18887f5f60 Fix API audit CADF audit map for failover action
There was a bug in the CADF audit map file for the "failover" action.

This patch corrects the audit map file to handle "failover" correctly
and stop keystonemiddleware from raising an exception.

Change-Id: If3954ba34740e26937dba10bdd8061acde758c88
Story: 2007831
Task: 40116
2020-06-18 10:03:59 -07:00
Zuul 0a697a352c Merge "Switch oslo.policy over to yaml" 2020-06-11 22:11:11 +00:00
Michael Johnson fafabad042 Switch oslo.policy over to yaml
Oslo.policy is moving away from using json format policy files[1].

This patch updates the Octavia documentation, policy configuration file, and
legacy admin-or-owner policy file to be in yaml format.

Octavia will continue to honor and support the json format file as long
as oslo.policy does, but this patch will encourage new deployments
to use the yaml format.

[1] https://docs.openstack.org/oslo.policy/latest/admin/policy-json-file.html

Change-Id: I925cc05981e677c0552b18f845fdbc512d2af22c
2020-06-08 08:54:07 -07:00
Yang JianFeng 5d91913136 Add quota support to octavia's l7policy and l7rule
Current octavia has no l7policy and l7rule quota definitions. But
they are necessary for some scenarios. For example, implement
product design compatible with Neutron Lbaas.

Story: 2003382
Task: 24457
Change-Id: I09ee23dcb83f5f08a56e25cc05ff77caa3ad4230
2020-06-08 02:28:51 +00:00
Dawson Coleman 270b973bf9 Add minimum TLS version option in octavia.conf
Add new configuration option "minimum_tls_versions" to octavia.conf.
Listeners, pools, or the default values for either will be blocked from
using lower versions.

Change-Id: Ifa0d695c2227772d6b37987a7857fe58ca660dc8
Story: 2006733
Task: 37171
Depends-On: I480b7fb9756d98ba9dbcdfd1d4b193ce6868e291
2020-06-04 13:11:01 -07:00
Dawson Coleman 9a6da86481 Add TLS version configuration for pools
Add field tls_versions to pools for restricing TLS versions used.
This is a colon-separated string of versions to be used.
Available values (as defined in octavia-lib):
SSLv3, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3

Add default_pool_tls_versions in octavia.conf

Note: TLSv1.3 connections will use haproxy's default ciphers
instead of the listener's tls_ciphers field

Change-Id: I480b7fb9756d98ba9dbcdfd1d4b193ce6868e291
Story: 2006733
Task: 37173
Depends-On: Ic33d9b9a256490ae1b048cdfd2475d6340509fdb
2020-06-03 21:58:47 +00:00