In order to support Python 3.7, pylint has to be updated to 2.0.0
minimum. Newer versions of Pylint enforce additional checkers which can
be addressed with some code refactoring rather than silently ignoring
them in pylintrc; except useless-object-inheritance which is required to
be silented so that we stay compatible with Python 2.x.
Story: 2004073
Task: 27434
Change-Id: I52301d763797d619f195bd8a1c32bc47f1e68420
Fixed an exception thrown by neutron_client's list_ports when the
deletion of the VIP security group fails.
Story 2005355
Task 30309
Change-Id: I7d972dcc6b43406523063f2082b42e2d9a2b50c9
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
A recent patch[1] introduced parallel network configuration on load
balancer boot. However, this patch has a race condition between the
parallel booting amphora.
This patch corrects this by making the get amphora network configurations
task to work on a single amphora if one is presented to the task.
Change-Id: Ideb050a215b0b0335ea94163650959994f987008
Story: 2005080
Task: 29659
This patch adds support for flavor metadata validation by the amphora driver
and support for setting the load balancer topology via a flavor.
It also adds "flavor_id" to the load balancer table in the database.
Change-Id: I8eae870abdb20dc32917957e32606deef387ec88
Replace calls to the nova client with calls to the compute driver.
This will help non vm efforts (e.g. zune) and also make the code
easier to break up later.
Change-Id: I7ee175c5ecb98af0ca5e299c2ac10e43eb40ed30
Octavia had a regression where it was not longer compatible with older
versions of neutron due to a change for the VIP port ownership.
This patch fixes that regression by checking if the project-id extension
to neutron is persent.
Change-Id: Iee405ceaee91f58d6163679b4c8809d1d27f855b
Story: 2003278
Task: 24219
These files will split with the current Octavia repo, before other parts
are ok.
Patch List:
[1] Finish keepalived LVS jinja template for UDP support
[2] Extend the ability of amp agent for upload/refresh the keepalived
process
[3] Extend the db model and db table with necessary fields for met the new
udp backend
[4] Add logic/workflow elements process in UDP cases
[5] Extend the existing API to access udp parameters in Listener API
[6] Extend the existing pool API to access the new option in
session_persistence fields
Change-Id: Ib4924e602d450b1feadb29e830d715ae77f5bbfe
There seems to be a case where we successfully retrieve the port
but when we try to update it might be gone because someone deleted
the vip port manually while our delete was scheduled.
Octavia does the right thing and marks the LB in ERROR bu this
will make our delete a bit more resilient to outside interference.
Change-Id: I847e46a674ba31c3e9669a99bf5c0268a3e26d23
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
This patch also updates pylint to 1.5.6 which is compatible with
python3.
In updating pylint we have some issues to correct, this patch addresses
those issues so the Octavia code passes pylint 1.5.6.
Change-Id: Iec21f4c803a427059d595612336d67a35ebf9585
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
The PluggedVIPNotFound exception is no longer being raised anywhere
so we can drop any references to it.
Change-Id: Ida424233a3a7fbb372a837ba3f484abd089d38aa
The base meta-class and no-op network driver had an incorrect plug_port
parameter compared to the allowed-address-pairs driver. This patch corrects
this and aligns the driver signatures.
Change-Id: I74a57ab1374a3cea431fa750aa464d5628e4ef85
This also fix build-openstack-sphinx-docs, there was a change introduced
in sphinx 1.6.6:
https://github.com/sphinx-doc/sphinx/pull/4335/files
If the size of __init__.py is less than 2, then the module would be
skipped which will cause the sphinx consistency checking failing later.
Change-Id: I9d8764b6e907aceed8bb8a9b04711145d0eb32ad
The network no-op driver was not returning the required data for a
get_network_configs call which causes load balancer failover tests to
fail when using the no-op driver.
Change-Id: I52b5651a7b33aae42760b850f913b6b591367207
On listener create or delete we update the VIP security group rules to
reflect the addition or removal of the TCP port on the VIP.
In the unusual event that the security group is missing in neutron, even
listener delete calls would fail.
This patch allows listener deletes to continue if the security group is
missing from the VIP.
Change-Id: Ic0186c34d3215869f1b92bcd4c8e015e0dd54053
Story: 2001381
Task: 5955
Floating IP model isn't used yet in-tree, but the conversion is tested,
and it could be used by various drivers (it is already used by the FLIP
driver).
Change-Id: I5f54c5ea5e70ea03f830548d61a2afee205f7f63
An IndexError exception is raised when trying to get non-existing and
unique item resources via Neutron network driver.
Even though the exception is caught and raises a base.NetworkException
exception, it should raise an exception from
neutron_client_exceptions.NotFound instead.
Story: 2001424
Task: 6130
Change-Id: I0e99e846bb58b88d98598f2f2b52c7c1f8ea0967
The 'message' class member in Exception was deprecated in PY2.6 and
removed in PY3.0 [1]. Should Neutron code abandon its use of this
field, it will break current Octavia code.
This patch shields Octavia of such change, replacing exc.message
calls with exc.__str__().
[1] - https://www.python.org/dev/peps/pep-0352/
Change-Id: Ia7836f0d68e20d9964334bc41f7789efd1007939
This patch extend Octavia v2 API to access qos_policy_id from neutron.
Users can pass it as 'vip_qos_policy_id' to Octavia request body to
create/update Loadbalancers, and the vrrp ports will have the qos
abilities.
This patch modifies the Loadbalancer Post/Put request body and response
body. It also extends the 'vip' table with the new column named
'qos_policy_id' to store the qos_id from neutron.
Co-Authored-By: Reedip <reedip.banerjee@nectechnologies.in>
Change-Id: I43aba9d2ae816b1498d16da077936d6bdb62e30a
* Add support to resource names that contain underscores (e.g. qos_policy)
* Update _get_resources_by_filters to return a list of matches
by default.
* Add mock constants
Change-Id: Idc193a2ba7df29025b12da8335efebb8d6b4b5af
This brings Octavia in line with what n-lbaas does for VIP port and
allows a user to attach a FIP to the VIP port generated by Octavia.
Change-Id: Ib7e6374cad49a16a733dacb2ea1ca096d8c4e6e4
It is possible that during the `_update_security_group_rules` operation,
the security group rule which is to be deleted gets removed by some
other external operation. If this happens, it raises a NotFound
exception is not handled which can lead to a load balancer stuck in
a PENDING_DELETE status.
Depends-On: I97b52b80efb33749647229a55147a08afa112dd2
Change-Id: Ic9ebe8392758f3de5fc6a94f815f83d6de113188
Story: 2001300
Task: 5851
The allowed address pairs network driver did not handle having objects
already deleted properly and would prematurely fail.
This patch improves the edge case handling of the driver.
Change-Id: Ice15aa2d6309648da43d6a40ce0286d5dce17500
Story: 2001258
Task: 5791
This addition automates the process, as opposed to relying on review inputs.
Inspired by Ib51bd97dc4394ef2b46d4dbb7fb36a9aa9f8fe3d
Change-Id: I1d6051cf6678b6d5db774fc884390fec626c1f2c
Previously the neutron network driver was masking the actual error being
returned from neutron while doing a VIP port allocation.
This patch will pass through the neutron error to the user if it is
an API ready exception giving the user more useful information about the
error neutron is reporting. For example that the requested VIP address is
already allocated.
Change-Id: Ic327b06ff9ccf9ae0c9931a8e6569c20d03c4a79
Closes-Bug: #1714593
Story: 1714593
Task: 5005
Octavia v2 API was failing to create the load balancer when the user
specified a VIP port ID.
This also improves the user experience when specifying a VIP address.
It also removes the un-used nova_network directory.
Change-Id: I8b533094df1e5425f824fff0454335709ce05447
Closes-Bug: #1709922
If the lb security group contains 1 rule without protocol, worker may
raise error in _update_security_group_rules when listener creation.
Change-Id: Idc826d251296435119ae963c832de29160062967
Right now the vip data isn't actually stored back to the DB, it just
looks like it is... So, actually it will create a port and then orphan
it, then create another port with a different IP later.
Change-Id: Ibb7b2bd89155e37fb41a5f62ba2cda6e233a127a
This patch updates the Octavia documentation in support of the
OpenStack documentation migration[1].
[1] https://specs.openstack.org/openstack/docs-specs/specs \
/pike/os-manuals-migration.html
Change-Id: I97fd038b8050bfe776c3fca8336d9090f8236362
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
This allows LB creates with the noop driver when providing a network_id,
because it tries to validate the subnet.
Closes-Bug: #1687584
Change-Id: I4ebcbaae659bb6ee76e74ec7564e01a7a5a92a3c
A loop to delete vip ports had an improperly scoped try block that
could, under the right circumstance lead to ports not getting deleted.
This patch fixes that scoping.
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Change-Id: I162eed5e48b361ed9f4c5b10edcf90bd8a7d4818
Currently, we can create LB instance with vip-subnet. But we create vrrp
port with neutron network using the default neutron behavior. So the port
may be different subnet with vip. This may be useless.
This patch create the vrrp in the same subnet.
Change-Id: If912a9686fe072eb9288b348bb818082363e6c0b
Closes-Bug: #1653943