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
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
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
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
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
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
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
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
In a time of starting neutron with more than 100 loadbalancers this
reduces real from 37.819s to 13.978s.
Change-Id: I8659869220073fe73bb7d8624ea43d0c7f28d41d
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