3131 Commits

Author SHA1 Message Date
Zuul
73fca169ab Merge "Exclude acpid on Red Hat family DIB builds" 2020-03-25 19:34:36 +00: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
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
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
Michael Johnson
1f9915037a Add a periodic image build job
This patch adds a periodic job to build the amphora image using the
released version of diskimage-builder (our other jobs use Git master).
This job will not publish the produced image, it is only to test the
build.

Change-Id: I611d9cd5a519abc6a330ec2c46a2f5a1fdb89313
2020-02-06 13:52:24 -08:00
Zuul
af9edc30d7 Merge "Complete dropping py27 support goal" 2020-02-06 19:54:18 +00:00
Adam Harwell
d973322529 Add diskimage-create arg for Octavia Git branch
Use `-g` to select the current Git branch to use for the amphora
build. This has historically been confusing for people, and this should
make it a little easier.

Change-Id: Iab01faaa17507c7bea399db7ee8f27f88d8de183
2020-02-05 13:14:48 -08:00
Adam Harwell
005cd1e6a6 Update the lb_id on an amp earlier if we know it
When we create amphora for specific loadbalancer it would be
good to get info about mapping pair loadbalancer-amphora as
soon as possible.

For example, if admin needs to debug connectivity issues with amphora
VMs - loadbalancer_id won't be set until AmphoraComputeConnectivityWait
task succeeds (which is never for such case) so they have to go to worker
logs to understand which amphora is related to a currently creating
loadbalancer.

Co-Authored-By: Ann Taraday <akamyshnikova@mirantis.com>
Change-Id: I865445af34bc63b90d965ef5e2c8f9f49aa9c2f3
2020-02-03 10:38:45 -08:00
Zuul
084b832a41 Merge "Fix jobs not running and add new ones to the gate" 2020-02-02 09:01:44 +00:00
Zuul
3b3d502fb2 Merge "Stop supporting CentOS 7 controllers and images" 2020-02-02 08:56:40 +00:00
Zuul
9f89da5f22 Merge "Support haproxy development snapshot version parsing" 2020-02-01 11:38:17 +00:00
Zuul
4bd9c65e4a Merge "Fix house keeping graceful shutdown" 2020-01-30 22:39:22 +00:00
Zuul
73096a5da1 Merge "Fix unit test when run on CentOS 7" 2020-01-30 22:35:59 +00:00
Gregory Thiemonge
7dc54eb9c9 Support haproxy development snapshot version parsing
Fix haproxy version parser in amphora-agent for beta versions (i.e
2.2-dev0)

Change-Id: I5baf7d18105494259361be1f0f411412071f1d36
2020-01-27 15:07:05 +01:00
Zuul
fb37005661 Merge "Transition l7rule flows to dicts" 2020-01-26 18:19:27 +00:00
Zuul
789f5310ca Merge "Transition l7policy flows to dicts" 2020-01-26 18:19:22 +00:00
Zuul
bb775f876a Merge "Convert health_monitor flows to use provider models" 2020-01-26 18:19:18 +00:00
Zuul
741a47763d Merge "Fix the interface filenames for Red Hat amphora images" 2020-01-24 17:08:13 +00:00
Ann Kamyshnikova
ea6b065cb0 Transition l7rule flows to dicts
Change-Id: Id94a293a88d27546c0fe7b45367922fa4cca260a
Story: 2005072
Task: 30813
2020-01-24 16:58:07 +04:00
Ann Kamyshnikova
7d310c3985 Transition l7policy flows to dicts
Story: 2005072
Task: 30812

Change-Id: I44919db35570fda7cc81a194c8c26e22c145855c
2020-01-24 16:58:07 +04:00
Ann Kamyshnikova
657068a278 Convert health_monitor flows to use provider models
Change-Id: Ifab50d30dbaf197dd2ba3b5e11b94732eb2e0aaf
Story: 2005072
Task: 30811
2020-01-24 16:58:07 +04:00