3349 Commits

Author SHA1 Message Date
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
Zuul
78863cf7ee Merge "Don't register cli opts on import" 2020-04-07 17:14:58 +00:00
Zuul
8c6d64baa7 Merge "Add ability to set TLS cipher list for listeners" 2020-04-07 16:45:27 +00:00
Ben Nemec
19d80f11a4 Don't register cli opts on import
A recent change in oslo.policy has made it register its cli opts on
the global config object. This was done to fix a bug where the opts
passed to the oslo.policy cli tools would get lost once it called
into project code because it was previously using a private config
object.

Octavia had already fixed this bug in a different way by filtering
the args in the enforcer code, which should no longer be necessary
now that the oslo.policy fix has merged.

However, the use of the global config object by the policy cli has
introduced a new problem, which is that after the config object is
initialized you can't register more cli opts. Because Octavia was
registering cli opts on import, this means that when the policy
tools call the Octavia policy entrypoint those opts get registered
and cause a failure.

To fix that, this change moves the cli opt registration into a
function that gets called from config.init so they will only get
registered when running an actual Octavia service. A separate
function was needed because they also need to be registered in
unit tests, and we don't want to actually initialize the entire
config object there. This way they can be initialized properly
in both scenarios.

Change-Id: I48ae260335f67e8ab1a188a94e44a7f1968e6fe9
2020-04-07 00:06:44 +00: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
Zuul
5cbe0453f6 Merge "Add F5 Networks provider driver by SAP SE" 2020-04-02 14:07:25 +00:00
Zuul
5f30b749ac Merge "Update hacking for Python3" 2020-04-02 13:32:22 +00:00
Carlos Goncalves
cb7fdece3a Add F5 Networks provider driver by SAP SE
Change-Id: Idc1e82601a1a757bd0f083e97bc06652717728e2
2020-03-31 11:21:37 +00:00
Zuul
cd4a52f50d Merge "Ussuri contributor docs community goal" 2020-03-30 11:08:20 +00:00
Andreas Jaeger
79464c0e04 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Add test-requirements.txt to doc building, hacking is now imported and
needed for autodoc.

Change-Id: I06211ef20131c64deba135123e53d87f3b5356a2
2020-03-30 10:03:05 +00:00
Zuul
51f8d25fbd Merge "Add UDP LBs to the basic cookbook" 2020-03-30 06:10:44 +00:00
Zuul
0475acaab1 Merge "Fix TESTING.rst example" 2020-03-27 15:31:24 +00:00
Michael Johnson
399331b01a Ussuri contributor docs community goal
This patch updates the Octavia contributor documentation to follow
the guidelines of the Ussuri cycle community goal[1].

[1] https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html

Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>
Story: 2007236
Task: 38542
Change-Id: I5f109a4e9ac2e31939ff28b655ffb00c1c02b417
2020-03-25 16:55:48 -07:00
Zuul
73fca169ab Merge "Exclude acpid on Red Hat family DIB builds" 2020-03-25 19:34:36 +00:00
Carlos Goncalves
37b8bc9b16 Fix amphora image build jobs
The amphora image build jobs are python3. Installing python-yaml
(python 2) causes trouble.

Change-Id: I1d591dda5fbb7aaea4d51da5a1d2218114051f36
2020-03-25 13:31:05 +01:00
Zuul
70e244fff5 Merge "Pick stale amphora randomly" 2020-03-25 04:11:55 +00:00
Zuul
894fdcafa4 Merge "Allow AZ to override valid_vip_networks config" 2020-03-23 20:28:58 +00:00
Zuul
85824b3282 Merge "Network Delta calculations should respect AZs" 2020-03-23 20:28:57 +00:00
Michael Johnson
81ed1334d2 Exclude acpid on Red Hat family DIB builds
Red Hat/centos do not ship acpid for ppc64le, but others do.
This patch sets up a package map for DIB to exclude the acpid
package on Red Hat family image builds, while allowing it for the
other distros.

Change-Id: Iaef520e5f2a66833228e824ec4fb41f5915169af
2020-03-23 09:27:10 -07:00
Zuul
2cf00d8c85 Merge "Fix padding logic for UDP health daemon" 2020-03-23 03:16:56 +00:00
Adam Harwell
d27ee3f0ee Fix padding logic for UDP health daemon
Should have done "pad to 8 characters" on the hex conversion, but it was
instead hardcoded to pad a single `0`, which is right in a lot of cases
but not all.

For example:
>>> ip1 = ipaddress.ip_address('98.136.140.23')
>>> ip2 = ipaddress.ip_address('10.1.1.1')
>>> "%X" % ip1._ip
'62888C17'
>>> "%X" % ip2._ip
'A010101'

Change-Id: Ia9fec4e72c00f7086489b245d9dc50ed9c27f12a
2020-03-20 16:51:44 -07:00
Zuul
fa77cae14a Merge "Add a periodic image build job" 2020-03-20 21:58:11 +00:00
Zuul
7f617a3ab7 Merge "Add oslo middleware healthcheck to Octavia API" 2020-03-20 21:43:01 +00:00
Zuul
d2b432b07e Merge "Fix load balancer update with provider filtered params" 2020-03-20 08:06:31 +00:00
Sam Morrison
18020e6c88 Add oslo middleware healthcheck to Octavia API
healthcheck middleware adds a /healthcheck url that allows
unauthenticated access to provide a simple check when running
octavia-api behind a load balancer

https://docs.openstack.org/oslo.middleware/latest/reference/healthcheck_plugins.html

Co-authored-by: Michael Johnson <johnsomor@gmail.com>
Change-Id: I10db6226750f7b7c703067d2ab82eea3a9875112
2020-03-19 11:24:16 -07:00
Zuul
22fa179edc Merge "Remove the barbican "Grant access" from cookbook" 2020-03-19 14:27:34 +00:00
Brian Haley
f6b957e8ee Remove all usage of six library
Convert all code to not require six library and instead
use python 3.x logic.

Created one helper method in common.utils for binary
representation to limit code changes.

Change-Id: I2716ce93691d11100ee951a3a3f491329a4073f0
2020-03-18 17:15:26 -04:00
Brian Haley
70f5df1e17 Update cirros image to cirros-0.5.1-x86_64
Change example string and depend on devstack change to
make sure we won't break.

Depends-on: https://review.opendev.org/#/c/711492
Change-Id: I5ca700b27c3c5be26dc5132fafd9b6cffade2b6b
2020-03-18 12:21:44 -04:00
Michael Johnson
82abe333ad Remove the barbican "Grant access" from cookbook
We missed a line when removing the requirement to grant Octavia
access to the secret in barbican.
This patch corrects that oversight.

Change-Id: I3c6459becc415d6dc0792c44ca75e717b239cd92
2020-03-17 13:48:42 -07:00
Zuul
e0d4c98556 Merge "[Amphorav2] Fix noop driver case" 2020-03-17 17:36:12 +00:00
Zuul
157ad64c66 Merge "Stop "dnf makecache" in the amphora images" 2020-03-16 21:46:02 +00:00
Michael Johnson
c8b044af4a Stop "dnf makecache" in the amphora images
On base operating systems that use DNF there can be a systemd timer
that attempts to call out and update the dnf cache every hour.
This patch adds an diskimage-builder element that disables this
timer as most amphora will not be successful in updating this cache
because they do not have network access or DNS services avaialable.

Change-Id: I5dec631d3e66e1dfb6b8741caea89938ee18a7d8
Story: 2007408
Task: 39019
2020-03-16 16:53:27 +00:00
Ann Kamyshnikova
6bca6bef1b [Amphorav2] Fix noop driver case
Fix amphora creation with amphora_noop_driver
and network_noop_driver.

Change-Id: I5d3c4d5280916916e95120cfba6fc076a1650cf4
Story: 2005072
2020-03-16 10:50:28 +00:00
Zuul
978d57f3a4 Merge "Use sqlalchemy isnot(None)" 2020-03-13 08:25:18 +00:00
Zuul
6a535c979b Merge "Support hacking 2.0.0" 2020-03-13 07:47:07 +00:00
Brian Haley
27350a7d65 Use sqlalchemy isnot(None)
Instead of using '!= None' and pylint directives use
isnot(None) which should be equivalent.

Change-Id: I63f5fcb3421001e9e7f91b54707f53d2f20281cb
2020-03-13 03:57:25 +00:00
Brian Haley
c6db3e4f17 Support hacking 2.0.0
Eventually hacking will move to 2.0.0 (diskimage-builder
is holding it back), and when it does there will be a few
errors to fix.  We can get ahead of it so it doesn't
break us with some small changes for these items:

  F601 dictionary key $item repeated with different values
  F632 use ==/!= to compare str, bytes, and int literals
  E501 line too long

While doing this noticed the lower-constraints.txt for
hacking was set at 0.12.0, when test-requirements.txt
had it at 1.1.0, so fixed that as well.

Change-Id: I80d2a5f97e7a4896a8fa765c1971c8bb7e72d211
2020-03-12 20:53:01 -07:00
Ann Kamyshnikova
0f7d03feca Pick stale amphora randomly
Avoid getting the same amphora all the time if its loadbalancer
stuck in PENDING state and could not be failovered.

Story: 2007340
Task: 38877

Change-Id: I2f680a00be695c3828166e6803882765af79b79e
2020-03-06 15:23:12 +04:00
Michael Johnson
801b99ed00 Update the available provider drivers list.
This patch updates the list of known Octavia provider drivers.

Change-Id: Ic5e1717603a815de8655188e118b1ce95c99d9c1
2020-03-03 13:20:21 -08:00
Carlos Goncalves
2cfcd71a86 Fix load balancer update with provider filtered params
When only setting tags to an existing load balancer, the amphora driver
would try to apply QoS policy on VRRP ports even if no policy is
defined. This raised an NetworkException that led load balancers to go
into ERROR.

Task: 37589
Story: 2006922

Change-Id: I48315f8f293811e1d99584ea36da05c4211cf275
2020-02-26 09:09:31 -08:00
Adam Harwell
4a360bfda7 Allow AZ to override valid_vip_networks config
Different AZs may have access to different vip networks.

Change-Id: I7169b34d93bc8a265fc74fedcbba67e980285a7e
2020-02-25 01:30:56 +00:00
Adam Harwell
741397f1a9 Network Delta calculations should respect AZs
The network delta calculations were all based on the static configured
amp_boot_network_list which is not correct if it's overridden by the AZ.

Change-Id: Ia930e17c76cd601ac005de10fb03231a19f1a776
2020-02-25 01:30:12 +00:00
Adam Harwell
2c76209003 Select the right lb_network_ip interface using AZ
If the AZ system is being used and there is also a default boot network
set in the main config, the nova driver would not pick the right
interface when translating the amphora info for amps in custom AZs.

This affects the step that fetches the lb_network_ip (the management
address) from nova, immediately before the step that updates the
database with the correct IP. That IP is then used in the rest of the
amphora creation flow, which pulls in that address and uses it to
connect to the amp.

Change-Id: Ie4869035a557ebcddea2fce693067c82fbd2d2a9
2020-02-25 01:30:06 +00:00
Zuul
e0ae8a3cac Merge "Fix uncaught DB exception when trying to get a spare amphora" 2020-02-22 14:19:33 +00:00
Zuul
65a2a242be Merge "Add diskimage-create arg for Octavia Git branch" 2020-02-22 02:25:00 +00:00
Gregory Thiemonge
3bbd32a2a5 Fix uncaught DB exception when trying to get a spare amphora
The MapLoadbalancerToAmphora task performs some database queries but
doesn't catch any exception from it.

In case something goes wrong with the database or the query, this commit
catchs any exception from the DB call, logs it and then returns None to
switch to the next decider branch (boot a new amphora).

Story 2007320
Task 38831

Change-Id: Ifb6c34426e0927534d332a8bbf2c66aac6c002c5
2020-02-21 10:48:47 +01:00
Brian Haley
20fdbbecef Fix TESTING.rst example
There is no api.v1 functional test directory, just api.v2.

Trivialfix

Change-Id: I1b1a77fc671194524250db6c2ec9e89505ef602b
2020-02-18 18:11:05 -05:00
Michael Johnson
49036845c1 Remove the dependency on the "mock" package
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.

Change-Id: I72520a2ca010c2c27315d9dff839a4f9d7540b6b
2020-02-17 14:55:19 -08:00
Michael Johnson
bb0efa2a5d Add docs warning for PING health monitors
This patch adds a warning box to the load balancer cookbook clarifying
that the health monitor type of 'PING' should only be used in specific
cases.
This was called out in release notes, but was not clear in the cookbook.

Change-Id: I6b95891bec82e01c44b288cbe9796b1f87a07c32
2020-02-12 08:36:30 -08:00
Gregory Thiemonge
e1751220bc Add UDP LBs to the basic cookbook
Add a section to the basic cookbook that explains how to setup a UDP
load balancer with UDP-CONNECT health monitor.

And fix typos

Change-Id: Ib67a5c9437e3190f640a953c30f791cb34690910
2020-02-12 11:10:01 +01:00