Commit Graph

1045 Commits (65e132a734f005f090a384bfa129482d195c6d6e)

Author SHA1 Message Date
Gregory Thiemonge 65e132a734 Add support for monitor_{address,port} in UDP members
UDP members didn't support monitor_address and monitor_port parameters.
Setting those values didn't have any effects.

This commit enables the support of both parameters.

Story: 2005775
Task: 33492

Change-Id: Idaacfa60a1909d3f5e0f94371a405c8ce8ae9efa
4 years ago
Zuul 37799137a3 Merge "Fix multi-listener load balancers" 4 years ago
Zuul 80f4647648 Merge "Fix member API handling of None/null updates" 4 years ago
Michael Johnson 06ce4777c3 Fix multi-listener load balancers
Load balancers with multiple listeners, running on an amphora image
with HAProxy 1.8 or newer can experience excessive memory usage that
may lead to an ERROR provisioning_status.
This patch resolves this issue by consolidating the listeners into
a single haproxy process inside the amphora.

Story: 2005412
Task: 34744
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: Idaccbcfa0126f1e26fbb3ad770c65c9266cfad5b
4 years ago
Michael Johnson 45cf2f328f Add project_id to all of the provider objects
This patch adds a project_id field to all of the provider driver data
model objects.

This is useful for drivers to track/associate objects on the backend.

Change-Id: I8f509677da463bc5d0a7649f2f609045cf9b2dd7
4 years ago
Chuck Wilson feaa1ce021 only rollback DB when we have a connection to the DB
Story: 2006062
Task: 34775

Change-Id: I728a9aa82986edef8128907a48c9df87d119fa8f
4 years ago
Zuul fbe8368779 Merge "Workaround pyroute2 platform-dependent imports" 4 years ago
Zuul 3a9df30a9a Merge "Fix pool API handling of None/null updates" 4 years ago
Zuul b2d40c1120 Merge "Fix health monitor API handling of None updates" 4 years ago
Adam Harwell 624a63dce0 Workaround pyroute2 platform-dependent imports
Pyroute2 recently changed the way they import their base namespace
ojects. Now they are somewhat platform dependent, so on OSX unit tests
will fail for lack of linux-specific libs. Using `create=true` allows
the mocks to be created even if the library doesn't think they exist.
b69999ec82

Change-Id: I8f9c25e979a7e86ff0b8e19267e4525817802ba2
4 years ago
Zuul 954025cbc3 Merge "Fix a python3 issue in the amphora-agent" 4 years ago
Michael Johnson dc459e2213 Fix a python3 issue in the amphora-agent
An exception handler in the amphora-agent has a python3 string
comparison bug that will cause a TypeError.
This patch fixes that bug and adds test coverage for the
start_stop_listener.

Change-Id: I6f5d95c5f875edda530f54ae72386d6495235ca6
Story: 2005898
Task: 33760
4 years ago
Zuul 6e6f3a1f1c Merge "Fix TCP listener logging bug" 4 years ago
Michael Johnson 83af850ec2 Fix TCP listener logging bug
HAProxy is not handling two of the HTTP log format variables correct
when the load balancer has a TCP listener.
This patch corrects that problem.

Change-Id: I2eb8a0b5de46ee56321bc0009b6ca2b3ad4caebf
4 years ago
German Eichberger 686303e79d Amphora logging
Configure rsyslog to forward logs to a target host

Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Story: 1665069
Task: 33646

Change-Id: I00703f86555cbb574b943794b14a36fbc644f1b2
4 years ago
Michael Johnson 80ddbaeef4 Align logging in the amphora
This patch configures the primary components of the amphora to log
to syslog using consistent logging facilities.
By default, user traffic logs will go to LOG_LOCAL0 and the amphora
processes (haproxy, keepalived, etc.) will log to LOG_LOCAL1.

This is a patch supporting log offloading.

Change-Id: Ifda91e0310e812e34f1e398dd3176af8a9c58f89
Story: 1665069
Task: 5486
4 years ago
Zuul ff4680eb71 Merge "Create Amphora V2 provider driver" 4 years ago
Michael Johnson 0ab16921ae Create Amphora V2 provider driver
This patch creates an Amphora v2 provider driver as well as a
V2 controller worker.
This is in preparation for having the amphora driver use the new
provider driver data models and rely less on native Octavia database
access.
It is also a prepartion step for enabling TaskFlow JobBoard as
this work will move to storing dictionaries in the flows instead
of database models.

Change-Id: Ia65539a8c39560e2276750d8e79a637be4c0f265
Story: 2005072
Task: 30806
4 years ago
Michael Johnson 6d2e2be86a Remove references to OpenStack Anchor
The OpenStack Anchor project is now officially retired[1].

This patch removes the references to Anchor from Octavia.
These old references were confusing new users.

[1] https://review.opendev.org/#/c/611187/

Change-Id: Idfe90aa69b497e8270118174dde00567d7fab4ab
4 years ago
Zuul 59660fb365 Merge "Force amp-agent communication to TLSv1.2" 4 years ago
Michael Johnson a95f748156 Fix health monitor API handling of None updates
The current health monitor API does not properly handle
clearing/reseting values on update. Some integer only fields,
such as max_retries_down, will accept null, but will store the
value as "None". These will will cause failures updating the
amphora configuration.

This patch corrects this to appropriately handle None/null updates
to the health monitor parameters.

Change-Id: Ida1d544933aec9e5cd556aef57a06e9f19f1b255
Story: 2005374
Task: 33533
4 years ago
Michael Johnson fc9163fce9 Fix member API handling of None/null updates
The current member API does not properly handle clearing/reseting
values on update. Some integer only fields, such as weight,
will accept null, but will store the value as "None". These will
will cause failures updating the amphora configuration.

This patch corrects this to appropriately handle None/null updates
to the member parameters.

Change-Id: I41038b1d8d882efa19d991c07dca47f06dcbb5ca
Story: 2005374
Task: 33523
4 years ago
melissaml 3ee0f52151 Rename review.openstack.org to review.opendev.org
There are many references to review.openstack.org, and while the
redirect should work, we can also go ahead and fix them.

Change-Id: I02b3758e707319489e03a6cd00766b0b9381dc12
4 years ago
Adit Sarfaty e2defa6dd2 Fix catching driver exceptions
octavia_lib driver exceptions were not cought by call_provider
This patch add those exceptions, and also handles the native NotImplementedError
which does nto have all the expected fields.

Change-Id: I1a566353b7fb125184849b3a0f864d3ef6896d94
4 years ago
Carlos Goncalves 89f7d349e0 Delete unused files in tests/contrib
Code in octavia/tests/contrib is now obsoleted with the retirement of
neutron-lbaas.

Change-Id: I73566e535a16dd73f3b32659668d0fb6ae6ad22c
4 years ago
Zuul 18b9f10b90 Merge "Update hacking version to latest" 4 years ago
Zuul 0573d2c609 Merge "Performance improvement for non-udp health checks" 4 years ago
Michael Johnson db212fc304 Fix pool API handling of None/null updates
The current pool API does not properly handle clearing/reseting
values on update. There was a case where removing the CA and CRL
at the same time could be refused, requiring you to remove the
CRL first, then the CA reference. This patch resolves that issue.

This patch corrects this to appropriately handle None/null updates
to the pool parameters.

Change-Id: Iee8a12b693a09e96e59313e58beffe1b1985084f
Story: 2005374
Task: 31007
4 years ago
zhulingjie ff50886d79 Update hacking version to latest
This resolves extranous "improper escape sequence" warnings on
python 3.6+[1].

Note, this does not resolve those warnings from pylint. There
is already another proposed patch to address pylint[2].

[1] https://review.opendev.org/494322
[2] https://review.opendev.org/635236

Change-Id: Ie160436913e4d935bab118d31ba10193ac38bd8f
4 years ago
Adam Harwell 5b831f2a5b Force amp-agent communication to TLSv1.2
Also allow configuration of this minimum.
The previous default of SSLv2/3 is very insecure.

Change-Id: If34c7c34d9a6a77685fb177976dc2070760c7b37
4 years ago
Zuul 987a6b3f1d Merge "Replace git.openstack.org URLs with opendev.org URLs" 4 years ago
caoyuan 1910f024a3 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I291eb706df84489398b4f4b2736d7c5ab2e84747
4 years ago
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
4 years ago
Adam Harwell 24e77d606d Performance improvement for non-udp health checks
When no UDP listeners are present, skip the UDP health-check code
branch, which prevents expensive and unnecessary DB calls.
Also optimise the UDP health-check code so it only fetches information
for relevant listeners.

Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: I7fde54084b39c1d0529cfb0bcfb79697d63ea6ae
4 years ago
Adam Harwell 57d653cc63 Make amphora cert validity time configurable
This affects only the internal certificates that we generate and install
on Amphorae for use with the amphora-agent.

Change-Id: I8c3eb71246d339bd2d43092cce4e6122a49e9534
4 years ago
Michael Johnson 930a3236bf Fix listener API handling of None/null updates
The current listener API does not properly handle clearing/reseting
values on update. Some integer only fields, such as connection-limit,
will accept null, but will store the value as "None". These will
will cause failures updating the amphora configuration.

This patch corrects this to appropriately handle None/null updates
to the listener parameters.

Change-Id: I41c9bedd8a3452513af3d409fbacd65ea287f02a
Story: 2005374
Task: 30352
4 years ago
Zuul a728bc000f Merge "Fix setting of VIP QoS policy" 4 years ago
Carlos Goncalves e0c45ce4d2 Fix setting of VIP QoS policy
Load balancers were going in to ERROR when updating vip_qos_policy_id in
two different cases:

- QoS extension enabled: the VIP DB data model was incorrectly
  constructed ('vip_qos_policy_id' where it should have been
  'qos_policy_id')
- QoS extension disabled: setting an UUID or None would fail in the LB
  update flow as the extension is disabled, and the API would return
  HTTP 202 to the user.

Story: 2004602
Task: 28512

Change-Id: Ie974afa52fe70cbab72b7e7f75bf7ee1015e148c
4 years ago
Carlos Goncalves 95a872fcd9 Fix VIP plugging on CentOS-based amphorae
ifup does not provide option -v in CentOS-based amphorae.
This option was added in I0dbb145ab9a0bb8f831c1db28cabd262f9394e7e.

Story: 2005341
Task: 30288

Change-Id: I56947e0d2bb207b59b0b3928efc96546d6410f43
4 years ago
Zuul 9e5e5cd22f Merge "Fix initialization of Barbican client" 4 years ago
Michael Johnson 23a411413f Fix ifup failures on member interfaces with IPv6
When an older version of ifup is used, there are cases where bringing
up an IPv6 address on an interface will fail with "RTNETLINK answers:
File exists"
This patch corrects this issue by bringing the interface up and
flushing the existing addresses prior to the ifup.
This returns a previous behavior of the ifdown/ifup commands.

Change-Id: I0dbb145ab9a0bb8f831c1db28cabd262f9394e7e
Story: 2005320
Task: 30248
4 years ago
Michael Johnson 811ec10f32 Make sure the expected codes list is sorted
Previously the HTTP expected codes was using a set data type.
This patch changes the set to a sorted list to allow for consistent
testing and to make sure our expected codes list is always nicely
sorted.

Change-Id: Id53c2552221bb133d69193f60516c6a785b8c7f7
4 years ago
Zuul 68b9d06dae Merge "Fix a lifecycle bug with child objects" 4 years ago
Zuul a635dd6bc9 Merge "Limit spares pool to the spare_amphora_pool_size" 4 years ago
Michael Johnson f73fe9c084 Fix a lifecycle bug with child objects
In some edge cases, when a request comes in to update a child
resource (member, HM, or l7rule), the API would not always make
sure the parent object (pool or l7policy) was in a mutable status.

This patch fixes this by checking the parent provisioning_status
before allowing a muttable change on a child object.

It also resolves two cases where a parent object status was not being
reset on a reverted flow.

Change-Id: I86f76bebce0993215fd34ccd33251ba1e6c325a9
Story: 2005249
Task: 30043
4 years ago
Zuul 090c36cfd2 Merge "Refactors LB delete flow and removes listener delete" 4 years ago
Pavel Abalikhin dc5a708d9a Fix initialization of Barbican client
Region and endpoint_type parameters should be used when initializing
Barbican client.

Change-Id: Id5a0c6f061e36b93e82d2eea8a5bac9ede66b159
Story: 2005233
Task: 30015
4 years ago
German Eichberger 6a6e0d243b Refactors LB delete flow and removes listener delete
This refactors the method generating the lb delete flow and
removes redundant code between cascade and the normal delete.
It also removed the listener delete from the non-cascade flow
thus speeding up the deletion.

Change-Id: I6133e9b5f1c4c440a56bf75a1e3369424971f33a
4 years ago
Zuul 12668dec63 Merge "Fix LB failover when in ERROR" 4 years ago
Michael Johnson a205ab3ebe Limit spares pool to the spare_amphora_pool_size
This patch fixes a bug where the housekeeping controllers may launch
more spare amphora than the spare_amphora_pool_size setting.

Story: 2003094
Task 23186

Change-Id: I4c98b3442d2471662488184fa7e91ac64ec33279
4 years ago