Commit Graph

130 Commits

Author SHA1 Message Date
Michael Johnson 75c1bdd104 Add support for SR-IOV ports in Octavia
Change-Id: I16622add64076370dad85620043f71077bc9acbb
2024-02-28 15:56:35 +00:00
Zuul 25742da290 Merge "Update the bug tracker links in the doc (switch to Launchpad)" 2023-08-23 23:11:45 +00:00
Tom Weininger c907547512 Add support for HTTP Strict Transport Security
Closes-Bug: #2017972
Depends-on: https://review.opendev.org/c/openstack/octavia-lib/+/880821
Change-Id: I0f2f2ff6b8c430b2dd06d707097af74bb608dcc9
2023-08-23 18:18:02 +02:00
Gregory Thiemonge 9ba449c9a9 Update the bug tracker links in the doc (switch to Launchpad)
The Octavia has decided to move back to Launchpad for the B release
cycle.

Change-Id: I6f003377824867e74b1a96f9eb3e1df3fdf856da
2023-08-21 10:43:35 +02:00
Michael Johnson c0e550245a Fix Octavia API HTTP Accept header handling
This patch improves the Octavia API handling of HTTP Accept headers and
ensures the response content type will always be application/json.
Prior to this fix, requests with wildcard Accept headers may have
received a response from the API in a format other than JSON.

Story: 2010447
Task: 46932
Change-Id: Ia557ccb4b9d7576acce308e851ca742624f91d88
2023-02-16 23:23:35 +00:00
Zuul 6ec76b1282 Merge "Remove unnecessary unicode prefixes" 2022-09-05 06:21:16 +00:00
Gregory Thiemonge d9ee63f561 Allow multiple VIPs per LB
User can specify additional subnet_id/ip_address pairs to bring up on
the VIP port. This will allow for situations like having an LB with both
IPv4+IPv6 or being exposed on both public and a private network.

For UDP/SCTP loadbalancers, mixing IPv4 VIP and IPv6 members is not
supported (IPv6 VIP and IPv4 members as well). It's still possible to
use IPv4 and IPv6 VIPs at the same time in the same loadbalancer but an
IPv4 VIP can only communicate with IPv4 members.

Thanks Michael for help with validating/fixing the templates!
Thanks Gregory for help with the centos networking!

Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Co-Authored-By: Gregory Thiemonge <gthiemon@redhat.com>
Co-Authored-By: Brian Haley <haleyb.dev@gmail.com>
Story: 2005608
Task: 30847
Change-Id: Id7153dbf33b9616d7af685fcf13ad9a79793c06b
2022-08-31 17:08:35 +02:00
lixuehai b68b113eb4 Remove unnecessary unicode prefixes
Change-Id: Ib72f02450900654518cec9bef1b5dca397cbfb7a
2022-04-27 15:33:47 +08: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 6a7d8b2cdc Small fix in loadbalancer POST api-ref
The user can set flavor_id and provider, but the provider of the flavor
profiles must match the provider parameter.

Change-Id: I6453c177408e6d9db46317e3b3de26df3e44671c
2021-02-02 16:50:24 +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
Michael Johnson 8cd7a6b9d7 Update protocol combination api-ref for PROXYV2
A previous patch[1] forgot to update the api-ref protocol combination
tables for the PROXYV2 pools.
This patch corrects that oversight.

[1] https://review.opendev.org/747801

Change-Id: I84025c5d1d3091c408416fb78b92ae0a7a89b74e
2020-09-14 17:00:47 +00:00
Gregory Thiemonge 639c11751e Add SCTP support in API
Add SCTP support in the API for listeners, pools, health-monitors
resources.

Story: 2007884
Task: 40255

Change-Id: I57a3c528a20943724bdcd36422c689f496068330
2020-09-10 11:23:04 +00:00
Michael Johnson 7fe78c5943 Add proxy v2 protocol support
This patch adds support for the proxy protocol v2 on pools.

Depends-On: https://review.opendev.org/747296
Change-Id: Ic112c5e71ee9b6433b307fdf27059f217ba4136e
Story: 2005611
Task: 30858
2020-09-04 18:15:16 +00:00
Michael Johnson 59dcdd9a86 Add amphora delete API
This patch adds an amphora delete API. It can be used to delete
extra "spare" amphora after the feature has been disabled.

A followup patch will be required for the amphorav2 path as the
amphorav2 failover patch, which is required for the amphora delete
flow, has not yet merged.

Story: 2008014
Task: 40666

Change-Id: I32b6561c78c153a4b7e73b1a4b83e045fbe97fb6
2020-09-03 13:34:07 -07: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 4cb81a65e5 Merge "Correct a typo in the document" 2020-08-26 22:39:14 +00:00
Zuul 13faf288e4 Merge "Fix memory consumption issues with default connection_limit" 2020-08-24 07:50:16 +00:00
suhaiming d1da0c1cd7 Correct a typo in the document
Change-Id: I9cbf9c4cdf8d8b8bf8d896b2d59d45d0ee1d4fc5
2020-08-20 07:35:32 +00:00
Michael Johnson 9097c575c0 Clarify the current status of Octavia in README
There was some legacy (neutron-lbaas) language in the README.rst
file for Octavia. This patch updates that and highlights the API
version status documentation.

Change-Id: I16bff7fc1a1359f8c34f4e154aa6dd29a5dd7a9b
2020-08-18 17:23:06 +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
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 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
Dawson Coleman 6aad5d8b9f Add TLS version configuration for listeners
Add field tls_versions to listeners for restricting TLS versions used.
This is a list of versions to be used.
Available values (as defined in octavia-lib):
SSLv3, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3

Add default_listener_tls_versions in octavia.conf.

Note that at this time TLS 1.3 ciphersuites are not impelemented,
so any TLS 1.3 connections will use haproxy's default ciphers
instead of what's specified by tls_ciphers.

Change-Id: Ic33d9b9a256490ae1b048cdfd2475d6340509fdb
Story: 2006733
Task: 37170
Task: 37169
2020-06-03 14:57:47 -07:00
Andreas Jaeger acb4d7b4e1 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I87889f73207ecd940963fbe601ccbb79863b96ac
2020-05-21 13:06:24 +02:00
ZhaoBo 6e61991833 Support HTTP and TCP checks in UDP healthmonitor
This patch introduces 2 macros in lvs.

1. Support HTTP GET, allow users create HTTP healthmonitor for udp pool.
2. Support TCP check, allow users create TCP healthmonitor for udp pool.

Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: I61c7d8d4df54710a92b8c055be84bba29bf3d7e6
Story: 2003200
Task: 23356
Story: 2003199
Task: 23355
2020-04-15 16:18:35 +00:00
Adam Harwell 4f4804259f Add availability-zone to loadbalancer object docs
Change-Id: I8626c0338d4ad7d11bf5d56b022136cb4513d37e
2020-04-08 16:24:11 -07:00
Dawson Coleman d47f164a60 Add ability to specify TLS cipher list for pools
Pools can now be each be assigned an OpenSSL cipher string with the
field tls_ciphers.  A new configuration option, default_pool_ciphers,
specifies what cipher string to use for new tls-enabled pools
if one is not explicitly specified at time of creation.

Change-Id: Iedb7774bfb8d70ea307d6a513248e1fe2389fa34
Depends-On: I77da6f14063877af0077f2c12df1aab5d5ead187
Story: 2006627
Task: 37172
2020-04-07 20:59:56 -05:00
Dawson Coleman cd176e55c5 Add ability to set TLS cipher list for listeners
Listeners will now be able to each be assigned their own OpenSSL
cipher string with a new field: tls_ciphers.  There is also a new
configuration option, default_listener_ciphers, which specifies the
cipher string to assign to new listeners when one is not explicitly
specified.

Change-Id: I77da6f14063877af0077f2c12df1aab5d5ead187
Depends-On: Id5f4c20abd40dd092558a711987953012d4ae67f
Story: 2006627
Task: 36839
2020-04-06 17:06:32 -07:00
Yang JianFeng 47e0ef31bc Add listener and pool protocol validation
The pool and listener can't be combined arbitrarily. We need to add
some constraints in protocol side.

Story: 2003500
Tasks: 24777

Co-Authored-By: Carlos Goncalves <cgoncalves@redhat.com>
Change-Id: Ifed862639d3fc3de23ace4c7ceaea1a4eca62749
2020-01-08 15:38:48 -08:00
Adam Harwell 8ae6bc3697 Availability Zone admin API
Adds the ability for admins to create/manage availability_zones
and profiles for use with upcoming functionality. Works like flavors.

Depends-On: https://review.opendev.org/#/c/694057/
Change-Id: I468d9fdf8c9d0898f9e30f04ac233510a10a53fc
2019-11-22 09:49:17 -08:00
Michael Johnson b9d357ac76 Fix 'additive_only' parameter api-ref
The 'additive_only' patch was missing the "min_version" parameter
in the api-ref. This patch fixes that so users will know which API
version supports this parameter.

Change-Id: I05439ea1dd01c35bedcfc3eaa5d17ed8dd2ca348
2019-09-18 05:50:00 +00:00
Maciej Józefczyk 2eac7a7862 Add new algorithm SOURCE_IP_PORT
LB_ALGORITHM_SOURCE_IP_PORT is an algorithm used by OVN
Load Balancer [0]. This patch adds its support to the API.

[0] https://review.opendev.org/#/c/660369
Depends-On: I605f44f0f50219aa003df477de9bae4062f3c308

Change-Id: I436a6e553065d1755d465d20ad36f7ba2cbb8eba
Task: 35952
Story: 2006264
2019-09-13 15:19:15 +00:00
Carlos Goncalves f3b48bc2f7 Add VIP access control list
This patch extends the listener API to include the new parameter
'allowed_cidrs'. This parameter is a list of IPv4 or IPv6 CIDRs. Leaving
this list unset defaults to the traditional behavior of allowing all
ingress traffic to the listener. Setting it will deny all traffic but
all CIDRs set in the 'allowed_cidrs' list.

Note that the API will validate that all CIDRs match the same IP version
of the VIP. This may change later as part of work to allow multiple VIPs
per LB (Change-Id Id7153dbf33b9616d7af685fcf13ad9a79793c06b).

Task: 26210
Story: 2003686

Change-Id: Id2b560df1cde9ce9403afbd593bbaa6cae5f06d6
2019-09-13 10:09:25 +02:00
Adam Harwell 4b907b0627 Add `additive_only` parameter to Batch Member call
If `additive_only` is set, don't do a complete delta -- skip delete and
only update and create members (making the call additive rather than a
full replacement). This will allow for adding members in batches without
wiping out existing members.

Change-Id: I5e47d64243667cfaa10430e12229099b508de40e
2019-09-10 22:22:13 +00:00
Colin Gibbons 3b5a19c386 Standardizes terminology in Listener documentation
This addresses the potentially confusing use of two terms
(TERMINATED_TLS and TERMINATED_HTTPS) used to describe the same
behavior by standardizing on the term TERMINATED_HTTPS in the
parameters of the documentation.

Change-Id: I3f444ba8e68ba8fc692ba41eec1ad4672ba5a16b
Story: 2006405
Task: 36289
2019-08-15 14:03:38 -07:00
Zuul f80f25e862 Merge "Bump the openstackdocstheme extension to 1.20" 2019-07-30 12:38:48 +00:00
root 52485738b3 Correcting typo in healthmonitors-list-response.json - http_vesion to http_version.
There is a typographical error in healthmonitors-list-response.json.
Correcting spelling from http_vesion to http_version.

Task: 36020
Story: 2006304
Change-Id: I6be0a593b1deb43f8aba982043ebf427be57d937
2019-07-29 18:04:53 +05:30
pengyuesheng 6b056dac25 Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

Change-Id: I25030e46ced9b1c77fad543aa9285c053a388f14
2019-07-22 09:44:14 +08:00
Adam Harwell 29d4340e9f Remove v1 API and associated code
Includes some updates to docs and configs and related files to remove
references to neutron-lbaas. Also remove handlers.

Change-Id: I3082962841d3b645f3cbd1a6b41fc7fb28dcf7e6
2019-05-11 14:39:17 -07:00
Michael Johnson 7d1bdc31bb Fix missing REDIRECT_PREFIX in the api-ref
The Octavia API reference was missing the option of "REDIRECT_PREFIX"
as one of the L7 policy actions. This patch corrects that.

Change-Id: I5fa14354fb88b325380834e0deec09bfb813b409
2019-04-15 16:03:42 -07:00
ZhaoBo 44833d5d5e Support Host header inject for healthmonitor HTTP 1.1 health check
This patch adds 2 new options for healthmonitor HTTP health check.
'http_version' is for user to specify the HTTP version, 1.0 and 1.1 are
available.
'domain_name' is for user to specify the HTTP host header inject to check
the HTTP backend health.
'domain_name' only available when HTTP version is 1.1

Story: 2002160
Task: 20010
Change-Id: Id3bf3962a02fbf77cf886c40ac64588cbacd3832
2019-03-06 01:24:31 +00:00
ZhaoBo 25fb7e4c32 Support L7policy redirect http code
Currently, L7Policy already support the redirection by url_prefix.
Then we can support the redirection with HTTP code.

This patch adds an new option 'redirect_http_code' to L7Policy API.

Story: 2003609
Task: 24941
Change-Id: Id0c9c376ffbc2fb10ddb988537d0ef1a8205e586
2019-03-04 15:04:53 -08:00
ZhaoBo e0e9af3b51 Add boolean tls_enabled option into Pool
Add "tls_enabled" option in Pool API.
This option will work on cert cases or no cert cases.

Story: 2003858
Task: 26672
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I62e31aaa66748ba652dfd5dbfd5a8b06d9ba0dfe
2019-03-01 00:20:38 +00:00
ZhaoBo 7aa115a553 Add 2 new fields into Pool API for support re-encryption
Add tls_ca_container_id and crl_container_id into Pool API.

Story: 2003858
Task: 26672
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I6cd6e2ca8e48a5df707a70d22505dec9d752c7eb
2019-02-28 16:20:09 -08:00
ZhaoBo aa7ac7ab73 Pool support sni cert for backend re-encryption
Add 1 fields like Listener does, which is 'tls_container_ref', this
field is introduced into Pool for storage the pool client certificate to
the backend servers, when the traffic willing to bring a cert to the
servers and check for tls connection.

Story: 2003859
Task: 26685
Change-Id: I29b7c7116e6087c942179ed9efdead494ef277a3
2019-02-28 11:36:48 -08:00
ZhaoBo f77d7d0220 L7rule support client certificate cases
This patch add 4 new types for SSL connection ACL configuration.
Which are:
L7RULE_TYPE_SSL_CONN_HAS_CERT
L7RULE_TYPE_VERIFY_RESULT
L7RULE_TYPE_DN_FIELD

The first type can just accept the compare type "EQUAL_TO" and value
"True" string.
The second can just accept the int value string to check the certificate
verify result, also just support "EQUAL_TO" compare type.
The third can accept key, the distinguished name field and a match string,
this one supports all kind compare types.

Story: 2002165
Task: 20025
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I71b57d0f32d4839a770396645d2b9945d24f2853
2019-02-24 23:31:09 +00:00
ZhaoBo aa1bca0271 Add new ssl header into Listener for client certificate
Add new ssl headers:
'X-SSL-Client-Verify', 'X-SSL-Client-Has-Cert', 'X-SSL-Client-DN',
'X-SSL-Client-CN', 'X-SSL-Issuer', 'X-SSL-Client-SHA1',
'X-SSL-Client-Not-Before', 'X-SSL-Client-Not-After'

Allow users to send to the backend with multiple choices when
tls_terminated is enabled for client certificate.

Story: 2002165
Task: 20020

Change-Id: I112936ee85c9e0dcfb87b962176ba7d623989a30
2019-02-24 23:30:59 +00:00
ZhaoBo 20509e2337 Add crl-file option for certification
Add crl-file in Listener side.

Story: 2002165
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I9e2ec06719fbbfd19482c2b8d39220e7e4ed81e3
2019-02-24 15:29:59 -08:00
ZhaoBo 7a8eb3ce22 Add an option to the Octavia V2 listener API for client cert
Listener API for client cerificate authentication with "None,
Optional, Mandatory" options

Story: 2002165
Task: 20019
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: Ia753659981d99b315504f166c09afb8f5b14f195
2019-02-24 01:52:20 +00:00