Commit Graph

933 Commits

Author SHA1 Message Date
Adam Harwell f8d023fbfe Retiring neutron-lbaas
Depends-On: https://review.opendev.org/#/c/658493/
Change-Id: Ia4f4b335295c0e6add79fe0db5dd31b4327fdb54
2019-05-11 03:18:03 -07:00
Zuul 1912abd444 Merge "Feature correction: L7Policy/Rule for A10Networks" 2019-03-25 05:39:14 +00:00
Zuul f10ee8e9cf Merge "neutron-lbaas haproxy agent prevent vif unplug when failover occurs" 2019-03-25 05:39:12 +00:00
Michael Johnson a4c4944d56 Update neutron-lbaas for gate changes
The gates are now testing with python3 and we needed to update some
requirements.

Change-Id: I6e48becf2f1267e7059baeb12b5f0a137205fcff
2019-03-21 13:41:45 -07:00
Swaminathan Vasudevan 72399374b2 neutron-lbaas haproxy agent prevent vif unplug when failover occurs
When lbaas fails over after an agent is unresponsive, the dead
agent on coming up should not unplug the vif port, if the lbaas
is active on other agent and when failover is configured.

This patch fixes the problem.

Story: #2003672
Change-Id: I76c38b20eb72c1dba0a0a2a140bbe77053aa3ed0
2019-03-20 20:46:50 +00:00
omkartelee01 6fa73b9197 Feature correction: L7Policy/Rule for A10Networks
Adding correction required for A10Networks driver.
Added class L7PolicyManager and L7RuleManager in
previous commit but initialization was missing.
Added 2 lines to initialize the code properly.
These changes are specific to A10Networks driver
only.

Change-Id: I02dc7d5f194c374f88ffbb9c7cfe868633aa7f0b
2019-03-20 20:46:35 +00:00
Zuul 2552fb1e5d Merge "Update neutron quota_driver path" 2019-03-01 07:05:36 +00:00
Zuul 5617616416 Merge "Revert "Updated "create_pool" method in plugin"" 2019-02-28 22:46:29 +00:00
Brian Haley 2676ae227a Update neutron quota_driver path
It is now at neutron.db.quota.driver.DbQuotaDriver

Change-Id: I10154fffc141b72e0fd10923e57b0410dc58bf49
2019-02-27 16:12:50 -05:00
Zuul 0c8a451a9d Merge "stop using common db mixin" 2019-02-25 11:28:39 +00:00
Boden R c800a90f2f stop using common db mixin
All of the methods of common db mixin are available via neutron-lib
and the mixin will be removed before long.
This patch switches the code over to use neutron-lib's APIs rather
than those of the mixin and stops using common_db_mix for parent
classes.

Change-Id: I767b88d3a70d744e4170325a9f2c2dc36163756b
2019-02-11 07:56:13 -07:00
Erik Olof Gunnar Andersson 0295eccea6 Improve performance on get and create/update/delete requests
This change follows up on the previous performance improvements
and does the same for crud requests.
I9d67f0966561baaefb50ae97b943ff6593e194eb
I32328c5206b9cd6fb8d8764c079f22b6ea8bfa9e

We remove from_sqlalchemy_model and the related object intermediary
representation from the get_loabalancer, get_pool, get_listener,
get_healthmonitor, get_l7policy, get_l7policy_rule,
get_pool_member.

Instead it more directly transforms from the SQLAlchemy model to the
required api dictionary format. Thus this entirely skips loading a few
relations that walking the intermediary object model triggered without
the target output needing them.

This is in particular important on calls like _get_driver_for_loadbalancer
as it previously would load the loadbalancer and all related objects
just to get the provider name for the loadbalancer.

Story: 2004949
Task: 29365

Change-Id: Ic268ea3cdcf809f62ba1ab3ebf8ab6d22f871404
2019-02-06 22:40:24 +00:00
Zuul 187f7fa85b Merge "use payloads for PORT BEFORE_DELETE callbacks" 2019-02-04 10:42:14 +00:00
omkartelee01 9e7b1156f8 Feature: Adding L7Policy/Rule for A10Networks
Added Manager classes for L7Policy and L7Rules.
A10Networks neutron-lbaas-driver have recently
added feature for L7Policy and L7Rules.
Adding specific classes to enable the features.
Added class L7PolicyManager and L7RuleManager
with specific create, update and delete functions.
These changes are specific to A10Networks driver
only.

Change-Id: I053cc520eafc829c5dd1192aa158c041b45486bb
2019-01-25 16:22:34 +05:30
Michael Johnson 9a70a10446 Fix the scenario test gates
We currently use a gate hook that adds
a hardcoded image name which is cirros-0.3.5-x86_64-disk to work
around a devstack bug[2].

A recent patch[1] changed the deployed image to
cirros-0.3.6-x86_64-disk.

Now that the bug[2] has been resolved we no longer need to pin the
cirros image config in our gates.

[1] https://review.openstack.org/624716
[2] https://review.openstack.org/#/c/435106

Change-Id: Ia41577b38eca94617075f849a88ff3c126e407eb
2018-12-17 08:43:38 -08:00
Boden R 3fff6bb5f3 use neutron-lib for _model_query
The model_query module is in neutron-lib and the CommonDBMixin will
eventually be removed. This patch swiches use of the _model_query
method over to query_with_hooks from neutron-lib.

This patch also bumps the neutron-lib version up to 1.20.0

Change-Id: Ie8e9123cb2c58b4bde717648f2cfff7664da434e
2018-11-13 11:39:59 -07:00
YAMAMOTO Takashi 31dc1e3a0e Revert "Updated "create_pool" method in plugin"
This reverts commit c672b0d567.

Closes-Bug: #1802438
Change-Id: I21a068b73e366ea5c815ea14249cd3b3c6725315
2018-11-09 10:44:27 +00:00
Zuul 897906b4b2 Merge "use common rpc and exceptions from neutron-lib" 2018-11-08 19:48:56 +00:00
Rodolfo Alonso Hernandez c672b0d567 Updated "create_pool" method in plugin
Once the pool object is created in the DB and the listeners
are updated with the pool information, the updated listeners
are retrieved and populated into the pool object.

The DB method to create the pool now flushes the context to
retrieve an updated pool DB object at the end of the method,
instead of retrieving again the same object from the DB.

This is needed to make solve the Queens backport of
I32328c5206b9cd6fb8d8764c079f22b6ea8bfa9e.

Story: 2001962

Change-Id: Icf43952f6e5c5004a5c4d8d541b6efcb5d3ec50c
2018-10-12 16:12:46 +01:00
Boden R 51251b54a7 use common rpc and exceptions from neutron-lib
The neutron.common.rpc and exceptions were rehomed into neutron-lib and
are currently shimmed in neutron [1]

This patch consumes those modules from neutron-lib by using lib's
modules rather than neutrons.

[1] https://review.openstack.org/#/c/586525/

Change-Id: Ic6849eb2282ed39193a46421a6079d3dcb918442
2018-09-26 10:02:21 -06:00
Carlos Goncalves 111d0b2852 Fix memory leak in the haproxy provider driver
The haproxy provider driver uses a dict for caching load balancer
resources (including children resources). That alone already increases
memory consumption. A neutron-server restart solves this.

But the real issue is that the driver leaves some data behind when a LB
is deleted without freeing it up (unless neutron-server is restart)
hence the memory leak.

Story: 2003802
Task: 26534

Change-Id: I7c79271998d839c6afbeb6d92f888f6acd67704e
2018-09-18 21:28:15 +02:00
Adam Harwell 28ede08e8c Update L7-proxy gate to allow new Octavia features
Specifically: UDP is now a valid protocol, and session_persistence has
some new fields.

Change-Id: I6f2ab6cad89714773655481a17a88348900261ad
2018-09-14 12:23:03 -06:00
Zuul 0f9dc4f0a2 Merge "Gate API test for the lbaasv2-proxy plugin" 2018-08-28 23:45:45 +00:00
Boden R b7ff572f24 use payloads for PORT BEFORE_DELETE callbacks
This patch switches BEFORE_DELETE callback events for PORT resources
over to the payload style args use a DBEventPayload object in prep for
the depends on patch.

Change-Id: I8b4b0387f6934c3f1001d3aada5c47a784d3706a
Depends-On: https://review.openstack.org/#/c/595883/
2018-08-24 12:06:17 -06:00
Boden R fe6a360456 use setup_extension in unit tests
This patch switches usages of _setUpExtension over to setup_extension to
phase out the unused attr map parameter. For more details see
https://review.openstack.org/#/c/561305/

Change-Id: I65b3daa6ba0c6db324973fed4da5951b169e573d
2018-08-22 14:18:05 -06:00
Michael Johnson b11610699c Disable KVM at OVH
OVH infra hosts are causing "KVM: entry failed, hardware error 0x0"
failures where instances fail to start (cirros, etc.).
This patch excludes OVH instances from kvm enablement until the issue is
resolved.

Change-Id: I4d0183d68c80de6836f00a44f991bd773bdeb1db
2018-08-19 13:48:30 -07:00
OpenStack Proposal Bot 46d148b2b0 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ia0c5960c21673664083ca6fd48a7abdff2a01677
2018-08-13 06:12:30 +00:00
German Eichberger b7ea70a02c Gate API test for the lbaasv2-proxy plugin
Depends-On: https://review.openstack.org/559842

Change-Id: I87a53b45f0d9bbbe6426c588e68de3e07d22cc86
2018-08-11 06:05:20 +02:00
Michael Johnson 4099ed8584 Fix proxy extension for neutron RBAC
Neutron is looking for 'tenant_id' in the response from the proxy plugin.
This patch makes sure the 'project_id' returned from octavia is copied over
to the 'tenant_id' in the response to neutron or assigns the one from the
context.

This patch also adapts Octavia's 403 Forbidden errors to neutron's 404 [1].
[1] https://docs.openstack.org/neutron/pike/contributor/internals/ \
    policy.html#request-authorization

Neutron is also returning a 404 instead of a status "DELETED". This
adjusts that.

Neutron/tempest will ask for the tenant_id field - replace this with
project_id.

Handle 403 Forbidden

Fixes bug to not pass on empty string to Octavia

Story: 2002602
Task: 22220

Change-Id: I840b5e2e8a95a4b3e166db9f9aa44590441aa7b6
2018-08-09 15:04:37 +02:00
Michael Johnson e4a9d3c1df Fix neutron-lbaas tempest for filter validation
Neutron recently enabled filter validation[1] which caused the
neutron-lbaas tempest gates to fail due to an incorrect filter. This
patch corrects that filter.

[1] https://review.openstack.org/#/c/574907/

Change-Id: I93f4ad75398c634305dc829b3db1dd2ba3575184
2018-07-31 16:43:24 +02:00
Zuul d582fc52c7 Merge "Fix cookie session persistence in namespace driver" 2018-07-13 02:56:39 +00:00
Zuul 8ee36c0a1c Merge "Improve speed of listing from DB" 2018-07-06 17:02:18 +00:00
Michael Johnson 1e2a93a4a5 Fix cookie session persistence in namespace driver
The old namespace driver was using, the long deprecated, appsession
option for APP_COOKIE session persistence. This fails on HAProxy 1.6
and later.
This patch moves that over to the modern stick table method.

Change-Id: I834958f711525c08fad12e280abc308820b20521
Story: 1640882
Task: 5321
2018-07-05 21:38:19 -07:00
Michael Johnson fd55125641 Re-enable KVM
A recent kernel update in the nodepool images has resolved the issue
we were seeing with using KVM on some hosting providers.
This patch removes the exclusion for those hosting providers and
allows the neutron-lbaas gates to use KVM if it is available on the host.

Change-Id: I660f2cc915819a6181bfc25145bc567bf981bc53
2018-06-29 09:36:10 -07:00
Jan Zerebecki 397a6fe39c Improve speed of listing from DB
This removes from_sqlalchemy_model and the related object intermediary
representation from get_loabalancers, get_pools, get_listeners,
get_healthmonitors, get_l7policies, get_l7policy_rules,
get_pool_members.
Instead it more directly transforms from the SQLAlchemy model to the
required api dictionary format. Thus this entierly skips loading a few
relations that walking the intermediary object model triggered without
the target output needing them.

Use eager loading specified at query time where the api dictionary
representation is needed, as the relations needed for it are always the
same.

Removes eager loading from the model of the relations
L7Policy[rules]->L7Rule[policy] and
Listener[l7_policies]->L7Policy[listener] and
Listener[default_pool]->PoolV2[listeners].

These relations are sometimes unncessarily loaded and then never used.
E.g. the API dictionary format for loadbalancers does include policies
but not rules; does include listeners but not any L7Policy.

In a test with a bit more than 100 LBs this improved the speed of a cli
call of lbaas-loadbalancer-list from 50.932s to 2.335s. It similarly
improved lbaas-pool-list and lbaas-listener-list,
lbaas-healthmonitor-list, lbaas-l7policy-list, lbaas-l7rule-list,
lbaas-member-list.

This continues what I9d67f0966561baaefb50ae97b943ff6593e194eb started.

Story: 2001962
Change-Id: I32328c5206b9cd6fb8d8764c079f22b6ea8bfa9e
2018-06-19 00:39:02 +02:00
Adam Harwell 880073d669 Add gate for Direct L7-Proxy to Octavia
Depends-On: https://review.openstack.org/569881
Change-Id: I5d02d897b1b8fac69606ec46acc903fc9e826de8
2018-06-18 15:55:12 -05:00
Michael Johnson 723228c2e1 Exclude limestone from running with kvm
Hosts from limestone are also showing the qemu crash issue[1] when
using kvm. This patch excludes these hosts from running with kvm.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=192521

Change-Id: I2ec6ef9512ee7c96879306df5df0b4adbb604692
2018-06-17 15:44:31 -07:00
Zuul 90444fd11f Merge "Allow to create loadbalancer with chinese character" 2018-06-13 12:11:47 +00:00
yanpuqing 1502dc16f5 Allow to create loadbalancer with chinese character
Because loadbalancer's name will be written in haproxy configuration,
but chinese character can't be written correctly.
The patch use replaces loadbalancer's name with loadbalancer's id
in the templates.

Change-Id: If1a8017260f2c17f6b63cf2029fcc16d8b178a18
Story: 2001946
Task: 15064
2018-06-12 21:32:49 +00:00
Zuul c3cb720a54 Merge "Fix AtrributeError in update_listener" 2018-06-01 22:47:58 +00:00
Zuul 3890e8ad95 Merge "use retry_db_errors from neutron-lib" 2018-06-01 22:35:50 +00:00
Zuul b0bb16af82 Merge "tempest: healthmonitor is deleted via resource_cleanup" 2018-05-29 16:20:15 +00:00
Zuul 60f214e547 Merge "Remove key "l7_policies" in pool dict" 2018-05-26 03:55:43 +00:00
Boden R 6bd36d9be0 use retry_db_errors from neutron-lib
The externally consumed APIs from neutron.db.api were rehomed into
neutron-lib with https://review.openstack.org/#/c/557040/

This patch consumes the retry_db_errors from lib in prep for
https://review.openstack.org/#/c/570016

It also bumps the neutron-lib version up to 1.14.0

Change-Id: I92a02d0441928667e911496208cda3bd56009fbc
2018-05-22 13:40:33 -06:00
Zuul 3159634163 Merge "remove unused plugin.get_plugin_name()" 2018-05-17 00:43:39 +00:00
Zuul 0e0ce79ca4 Merge "Get providers directly from ORM to make startup take half as long" 2018-05-14 17:06:19 +00:00
Jan Zerebecki bea49e63d7 Get providers directly from ORM to make startup take half as long
In a time of starting neutron with more than 100 loadbalancers this
reduces real from 37.819s to 13.978s.

Change-Id: I8659869220073fe73bb7d8624ea43d0c7f28d41d
2018-05-08 14:51:32 +02:00
Adit Sarfaty ac518ed8c5 Fix EntityInUse exception message
EntityInUse exception message gets the entity-in-use ID, and not
the entrty-using ID, so the error message was wrong.

For example the old message could be:
listener <l7-policy-id> is using this l7policy

while it should be:
listener is using l7policy <l7-policy-id>

Change-Id: I81f1bebb20c04546dbb8d0cf56b8cb8dcdfc2107
2018-05-06 08:32:04 +03:00
Zuul 6af0eac974 Merge "Log failed cert delete, and raise TLSContainerInvalid instead" 2018-05-01 16:12:19 +00:00
Thomas Morin a7abc9ab2d remove unused plugin.get_plugin_name()
This method does not seem to be used anymore:

http://codesearch.openstack.org/?q=get_plugin_name&i=nope&files=&repos=neutron,neutron-lib

Change-Id: I910240fffa9bd677480c919768ea484ec2ac981d
2018-04-27 20:30:18 +00:00