Commit Graph

12 Commits

Author SHA1 Message Date
Brian Haley 86badcfe2d Fix some pylint indentation warnings
Running with a stricter .pylintrc generates a lot of
C0330 warnings (hanging/continued indentation). Fix
some remaining ones in miscellaneous directories.

Also cleanup any remaining code that I missed in this
series, or has changed since I started.

Trivialfix

Change-Id: I17b4779020a7bfb369c3e721ab6638cd4a6ab50c
2022-12-12 11:48:25 -05:00
Rajesh Tailor 8ab5ee1d17 Fix remaining typos in comments and tests
Change-Id: I872422cffd1f9a2e59b5e18a86695e5cb6edc2cd
2022-07-06 21:20:27 +05:30
Rodolfo Alonso Hernandez 132905d81f [L3][QoS] L3 agent QoS extension to handle duplicated FIPs
The L3 agent QoS extension should be able to handle duplicated floating
IP addresses from different registers. Those floating IP addresses can
be hosted in different networks and routers but the same compute node
and L3 agent.

Now, instead of using the IP address as unique identifier, this patch
stores the (ID, IP address) tuple. This tuple is unique per floating IP
register and holds the IP address, needed by the "tc" library to set
the QoS rules.

Closes-Bug: #1962465
Change-Id: I3a09718c6e79fd1f37eb75264389c4e5043076a7
2022-03-18 14:40:37 +00:00
Rodolfo Alonso Hernandez b1ecde9122 Add "update_network" implementation to "L3AgentExtension" child classes
Added "update_network" method implementation to all "L3AgentExtension"
child classes. This new method will be added as a new abstract method
in future neutron-lib releases.

Needed-By: https://review.opendev.org/c/openstack/neutron-lib/+/818536
Related-Bug: #1950454
Change-Id: Ib50d37d57c3d6a69a68876ae04f468325516d4eb
2021-12-02 09:42:09 +00:00
LIU Yulong 78629e0d37 Remove L3 IP QoS cache when router is down
When router admin-state is down or removed, fip-qos and gateway-ip-qos
extension should delete the router IPs' QoS rate limit cache. Then if
the router is up again the router floating IPs QoS can be reconfigured.
This patch achives these:
1. make sure floating IP or gateway IP QoS cache removed.
2. floating IP QoS can be re-configured to snat device when router
   doing admin_state down/up.

Closes-Bug: #1826695
Change-Id: I24fcecd9686ad17fa50093bb8bccab0d6c711298
2019-08-16 23:36:27 +08:00
zhufl 27b07ab013 [Trivial]Remove unused helper _remove_fip_rate_limit_cache
_remove_fip_rate_limit_cache is introduced in ab57410ec8
and is never used after it's created, so this is to remove it
for code clean.

Change-Id: Ie196dd7bff11dd1e742b569b5df2ce047ed057c5
2019-08-14 09:31:35 +08:00
Rodolfo Alonso Hernandez 6da30d3ae2 Remove default getattr values in RouterFipRateLimitMaps
When retrieving the class attributes, used as cache variables, the
getattr function should always return a class member and not a default
value, raising an exception if the attribute does not exist.

In case of using the default value, the data could be stored in a
temporary variable not stored in the class.

TrivialFix

Change-Id: Ib6bd097ec5fc55a3447b5406d5e4c5e3976b48ab
2019-08-05 15:20:06 +00:00
LIU Yulong ab57410ec8 Minimizing L3 agent QoS extensions lock granularity
If agent is concurrently processing large set of resources,
the bottleneck lock will multiply increase processing time
of those resources which have been waiting for the lock for
a long time.

This patch moves the lock to the core cache resource, and
leverage the coordination lock to the resource prcessing
and notification thread functions.

Closes-Bug: #1824911
Change-Id: Id43829b11631727f1a46362ffea5c22d2177fd79
2019-07-02 23:13:29 +08:00
LIU Yulong e108ac6bdf Add port forwarding floating IP QoS
Port forwarding floating IPs QoS should be limited under
the binding QoS policy. So this patch extends the l3-agent
fip-qos agent extension floating IP list with the port
forwarding related IPs.

Change-Id: Iddabfabafc0803edd1e4ac0893dc188f1907234a
Closes-Bug: #1796925
2019-01-30 14:04:00 +00:00
Brian Haley 2b57f08576 Fix flake8 H404 errors
Fix H404 error and start enforcing it.

Trivialfix

Change-Id: Iaa6fb4f1f07dee32a944259ab65204360d9db7ea
2018-10-05 21:48:41 +00:00
Bernard Cafarelli 7e0c1e9e23
[QoS] Clear rate limits when default null values are used
In that case before, tc was called with zero rate and burst values.
Newer iproute versions (>= 4.9) do not allow that anymore, so we send a
clear command instead

This also fixes QoS L3 agent extension functional tests run with such an
iproute version (CentOS 7.5, Ubuntu 18.04)

Change-Id: Idf16e2460bd434f5eab79745558c55c6579e81e8
Closes-Bug: #1782141
2018-07-20 11:23:19 +02:00
LIU Yulong 5e59cd2a5f Refactor for L3 router QoS extensions
Move the l3 qos extensions to a separated folder,
then we can move a following up router gateway IP
QoS extension to it.

And also extract some common code to a base class.

Related-Bug: #1757044
Change-Id: I63cc9506caa80f889ad817444281a0ac31bc9418
2018-05-17 10:11:27 +08:00